FasterXML / jackson-module-jaxb-annotations

(DEPRECATED!!!) Moved to: https://github.com/FasterXML/jackson-modules-base/
https://github.com/FasterXML/jackson-modules-base
44 stars 20 forks source link

if nillable is not ture , should return NON_NULL #48

Closed henryhulian closed 8 years ago

henryhulian commented 9 years ago

if nillable is not ture , should return NON_NULL, this issue infect wildfly10 that resteasy api default ignore null filed when marshall object to json, suggest change code back to --> return w.nillable() ? JsonInclude.Include.ALWAYS : JsonInclude.Include.NON_NULL;

cowtowncoder commented 8 years ago

As per discussion of #48, I will add a setting that allows this as alternate behavior, but will not change the default handling. Current behavior has been included in multiple minor versions, and another (potentially) breaking change is not something I would like to do. Further, due to defaulting of false value, I think that suggested change would be likely to cause unexpected behavior via @XmlElement -- simply adding @XmlElement to a property would change its inclusion criteria, even if nillable was not explicitly defined. To me that seems wrong.

I will add a new issue for the feature to add, linking to this issue.