Annotation Type JsonOmitNull


@Retention(CLASS) @Target({TYPE,FIELD}) public @interface JsonOmitNull

Leaves a member that is null out of the JSON instead of writing null.

On a field it applies to that field; on a class, to every field of it. Reading is unaffected: an absent member leaves the field as the constructor left it, and an explicit null sets it to null.