-
-
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
ObjectMapper
's .valueToTree()
wraps JsonNode
objects into a POJONode
#433
Comments
Uh, wait, actually it doesn't do this for all |
Fixed: the problem was due to value conversion writing to |
Hmmh. Come to think of it now, this will only solve the case of |
ObjectMapper
's .valueToTree()
wraps JsonSerializable
objects into a POJONodeObjectMapper
's .valueToTree()
wraps JsonNode
objects into a POJONode
Never mind. Was too fast with commentary. It really depends on exactly how |
Uhm, how do I understand your last statement then? I'd love to use that method; and I know I want |
Comment was on previous comment; but the short answer is that as far as I know, use of So you should not have to inspect anything: |
Affected versions: 2.2.3, 2.3.2.
Let us take these two sample classes:
and this one:
The execution of the first main gives:
However, the execution of the second one gives:
Therefore, if
.valueToTree()
is called on a class implementingJsonSerializable
, it embeds the result of the serialization into aPOJONode
!NOTE: I did check that it was the
.serialize()
method which was called and not.serializeWithType()
.The text was updated successfully, but these errors were encountered: