To ignore Null fields in JSON, Jackson provides Include.NON_NULL and to ignore Empty fields Jackson provides Include.NON_EMPTY.
Include.NON_NULL: Indicates that only properties with not null values will be included in JSON.Include.NON_EMPTY: Indicates that only properties that are not empty will be included in JSON. Non-empty can have different meaning for different objects such asListwith size zero will be considered as empty. In case ofMapto check emptyisEmpty()is called.
JacksonIgnoreNullTest