You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have enabled defaultTyping, and serialized Foo entity with no type info. I'm trying to read json as a tree with mapper.readTree(json), and it throws an exception
However, if I disable defaultTyping, the same code works fine. So, readTree(json) does not actually need type info for the root element, because it works when defaultTyping is disabled (i.e. {"bar" : "bar"}), but it throws the exception when defaultTyping is enabled, that's why it looks like a bug. The same thing happens for valueToTree(foo).
Jackson version is 2.5.3
Full code is provided.
Looks like earlier fix for #88 had a minor flaw, and it was not skipping type id for JsonNode with standard default typing which is the intended behavior (one can still force type id with custom default typing).
I have enabled
defaultTyping
, and serializedFoo
entity with no type info. I'm trying to read json as a tree withmapper.readTree(json)
, and it throws an exceptionHowever, if I disable
defaultTyping
, the same code works fine. So,readTree(json)
does not actually need type info for the root element, because it works whendefaultTyping
is disabled (i.e.{"bar" : "bar"}
), but it throws the exception whendefaultTyping
is enabled, that's why it looks like a bug. The same thing happens forvalueToTree(foo)
.Jackson version is
2.5.3
Full code is provided.
The text was updated successfully, but these errors were encountered: