This repository has been archived by the owner on Jan 22, 2019. It is now read-only.
Add a feature in JaxbAnnotationIntrospector
to define meaning of nillable=false
as "JsonInclude.NON_EMPTY"
#52
Milestone
(see #48, #49 for background)
Meaning of
nillable
property of@XmlElement
and@XmlElements
comes from XML Schema, and defines whether it is legal/mandatory to suppress writing out of empty collections. For Jackson this can be achieved by returning different inclusion criteria for a property annotated with one of these annotations.For a longer discussion, see the original change #39 (for Jackson 2.5.1), which covers many aspects of handling.
Since I am not convinced that the change suggested in #48 / #49 is safe (although perhaps returning
Include.NON_NULL
might be acceptable, more so thanNON_EMPTY
), I will add a setting with which one can specifically define whichJsonInclude.Incude
value to use fornillable = false
; default beingnull
(meaning none). To do what #48 asks,Include.NON_EMPTY
should be returned, or possiblyInclude.NON_NULL
.The text was updated successfully, but these errors were encountered: