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 am attempting to change the implementation of some code to use JSON-B instead of Jackson. In the process of doing so, I would like to match behavior so existing users are not impacted. One key behavior difference I have found is during deserialization Jackson will reject unrecognized properties, whereas JSON-B will simply ignore unrecognized properties.
I was looking around the API for a way to reject unrecognized properties (ideally via JsonbConfig). I posted this question on SO, but eventually I ran across this section of the JSON-B spec:
3.18 Must-Ignore policy
When JSON Binding implementation during deserialization encounters key in key/value pair that it does not recognize, it should treat the rest of the JSON document as if the element simply did not appear, and in particular, the implementation MUST NOT treat this as an error condition.
So this explains why the default behavior is the way it is... but is there any way to opt-out of this? It would be a key part of migrating existing applications from Jackson to JSON-B.
The text was updated successfully, but these errors were encountered:
I am attempting to change the implementation of some code to use JSON-B instead of Jackson. In the process of doing so, I would like to match behavior so existing users are not impacted. One key behavior difference I have found is during deserialization Jackson will reject unrecognized properties, whereas JSON-B will simply ignore unrecognized properties.
I was looking around the API for a way to reject unrecognized properties (ideally via
JsonbConfig
). I posted this question on SO, but eventually I ran across this section of the JSON-B spec:So this explains why the default behavior is the way it is... but is there any way to opt-out of this? It would be a key part of migrating existing applications from Jackson to JSON-B.
The text was updated successfully, but these errors were encountered: