jackson-databind
jackson-databind copied to clipboard
Support `@JsonInclude` for `Collection`
Describe your Issue
Currently @JsonInclude only works for limited set of types --see @JsonInclude javaDoc for more detail.
Goal is to support Collection type as well.
I think the big question is backwards compatibility: given many developers set global inclusion defaults, making Collections follow @JsonInclude could cause significant breakages.
So there probably needs to be MapperFeature for enabling this behavior (conceptually SerializationFeature, but that can be changed on per-call (mapper.writeValue()) basis, and if we cache serializers this couldn't be supported).
Makes sense! Will modify the PR to support the enable disable feature.