-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
ObjectReader.readValue(JsonNode)
does not work correctly with polymorphic types, value to update
#1831
Comments
I hope to have time to look into this. One thing to keep in mind is that Tree Model is meant to be exact representation of the content, without transformations, and is explicitly different than POJOs. |
Ok. This is interesting... usage seems correct. And using |
Ok. So the problem is not so much use of |
ObjectReader.readValue(JsonNode)
doesn't seem to work correctly with polymorphic types, value to update
ObjectReader.readValue(JsonNode)
doesn't seem to work correctly with polymorphic types, value to updateObjectReader.readValue(JsonNode)
does not work correctly with polymorphic types, value to update
Fixed for |
There seems to be a difference in behavior of
ObjectReader::readValue(JsonNode)
andObjectReader::readValue(String)
. In particular I've found a difference in how they treat the combination of@JsonUnwrapped
and@JsonSubTypes
and a custom deserializer. I am attaching two minimal test cases. They are identical but one usesObjectReader::readValue(JsonNode)
(and fails) and the other one usesObjectReader::readValue(String)
and passes.Tested on version 2.9.2.
unwrappedSubtypesBug.zip
The text was updated successfully, but these errors were encountered: