-
Notifications
You must be signed in to change notification settings - Fork 115
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
JsonTypeInfo and Optional #44
Comments
I don't know how it could have worked differently before, but I don't think type information should be included in this case. Problem is Java Type Erasure, and the type Jackson sees is simply This is different from having a POJO with such
type information would be included. So, this is really FAQ, although more commonly encountered with Unfortunate part is if earlier versions did make this appear to work: it should not have behaved that way. I think change is probably due to fix for #15. As to work-around: two common methods are:
I hope this helps. |
Ok, thanks a lot! |
FYI This is the root cause of the deserialization issue described at #59 |
I think i have found a bug, while upgrading my project from 2.8.7 -> 2.8.8. The classname is no longer part of the serialized json string. The test
testWithOptional
below fails in 2.8.8:The text was updated successfully, but these errors were encountered: