I have annotated a POJO on class level with
@org.codehaus.jackson.map.annotate.JsonSerialize(include=JsonSerialize.Inclusion.NON_EMPTY)
(annotating on method level doesn't work either) but null values will be serialized though. In my POM I have
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
<version>2.3.1</version>
</dependency>
How can I achieve that null values will NOT be serialized?