-
Notifications
You must be signed in to change notification settings - Fork 3
Jackson3 Changes JsonNode
Tatu Saloranta edited this page Nov 9, 2018
·
14 revisions
As of Jackson 2.x, only some of DeserializationFeatures (and few if any SerializationFeatures) affect handling of JsonNode. This is due to most of them being POJO-centric, as JsonNode is meant to be faithful representation of JSON that was read, or is to be written out, with few changes.
But users do have legitimate need/desire to make SOME changes. It's just that these changes are not necessarily aligned with changes to POJO handling.
With that, I suggest addition of...
This would be enumeration like DeserializationFeature with choices like:
- READ_NULL_PROPERTIES (default: true) -- are
nullvalued properties represented asNullNodes in resultingJsonObjector skipped? - WRITE_NULL_PROPERTIES (default: true) -- are
nullvalued fields inObjectNodewritten out as JSON or skipped? - READ_NULL_ELEMENTS (default: true) -- are
nullelements in JSON arrays represented asNullNodes in resultingJsonArrayor skipped? - WRITE_NULL_ELEMENTS (default: true) -- are
nullelements inArrayNodewritten out as JSON or skipped?