-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for reading Some(Map.empty) #529
Conversation
A very simple fix is to remove
But it looks very intentional that a |
When we used json to map objects into mongo, we tried hard not to optimize the payload. For example, for an optional field, we removed all I guess that We can also try to remove it, make some test release and check if all tests are passing. WDYT? |
I don't understand why we treat |
I tried removing the JObject instead of the hacky specialized reader (because your comment made sense) and hit something very strange. There are tests asserting that Shall put that commit in this PR? I am now mildly concerned there is a Mongo record somewhere with |
Yes, we should not have any |
A small failing test plus my suggested fix for what I think may be a bug in how it handles empty maps in an option. 🤔
Specifically
{}
in json when read into aOption[Map[String, _]]
becomesNone
instead ofMap.empty
.