-
-
Notifications
You must be signed in to change notification settings - Fork 143
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
Upgrade Option support to use ReferenceType. #253
Conversation
Only realized that I probably should have asked whether you wanted merge to occur (sometimes it makes sense to create PR first for review etc). But I think it's a good step, despite 3 failures for now. |
Another question: should I merge this to |
I can take care of master. I'm actually having second thoughts as to whether or not to merge this into the 2.7.x branch because the serialization format changes for Options under default typing. I think merging was fine in this case. Of the three tests that are failing two are Either with JsonTypeInfo annotations, which I'll follow up on your questions about whether or not it should be a ReferenceType and were caused by the changes in databind, not from this pull request. |
@nbauernfeind Ok. Yes, wrt 2.7, I did not expect these problems to surface. Would not have suggested change in patch if I had. Question on I hope to see how default typing works with |
One more thing: I think one reason for different behavior between
are different. This is bit unfortunate as it makes it more difficult to verify proper handling of |
You're absolutely right; good catch. This generates the naked string: case class User(name: String, email: Some[String]) Whereas this generates the wrapping type array: case class User(name: String, email: Option[String]) |
Further along, specifically wrt default typing: I think there may be need to "unwrap" reference types in |
@nbauernfeind I checked in minor improvements (... I hope...) to reference type handling, with respect to detecting type info to include. |
Thanks, I'll take a look later tonight. |
Fwtw, I think I am finally done with changes at least wrt Anyway good thing is that I will try my best to avoid making any changes in 2.7 in this area. :) |
@nbauernfeind One question related to this: when do you think Scala module would be ready for 2.7.3? |
There is one thing I have to sort out: the Either type propagation (which started failing after your databind changes to support Option's type propagation). I have been trying to track down one of the JsonCreator issues, #231. It would be nice to fix at least one of the JsonCreator category of bugs. If I can't tackle it by this Sunday, though, I'm fine letting 2.7.3 release. Also, I doubt that I will find anything else with Option without releasing. |
@nbauernfeind sounds reasonable. Looking at serializer, deserializer for |
Fixes #248, Supersedes #252.
I accidentally made the other pull request against the master branch, but I actually want this to go into the 2.7.x branch.