Add support for @JsonInclude(content=Include.NON_NULL)
(and NON_EMPTY) for Maps
#527
Milestone
@JsonInclude(content=Include.NON_NULL)
(and NON_EMPTY) for Maps
#527
(and other inclusion values)
Currently use of something like:
only affects value itself. But for structured values (arrays,
Collection
s,Map
s), there is also the question of inclusion strategy for contents.Currently the only way to control such inclusion is via global feature
SerializationFeature.WRITE_NULL_MAP_VALUES
, and that only affects handling ofMap
s.But it would seem reasonable to add an additional property in
@JsonInclude
, say,contents
, and modify structured type serializers to consider this for filtering.The first one to use it with should be
Map
(and specialized variants likeEnumMap
). But due to amount of work involved, let's add support for arrays andCollection
s if and when specifically requested.The text was updated successfully, but these errors were encountered: