Options
All
  • Public
  • Public/Protected
  • All
Menu

Enumeration JsonIncludeType

Enumeration used with JsonInclude to define which properties of a Class are to be included in serialization.

Index

Enumeration members

ALWAYS

ALWAYS:

Value that indicates that property is to be always included, independent of value of the property.

CUSTOM

CUSTOM:

Value that indicates that separate filter Object (specified by {@link JsonIncludeOptions.valueFilter} for value itself, and/or {@link JsonIncludeOptions.contentFilter} for contents of structured types) is to be used for determining inclusion criteria.

NON_DEFAULT

NON_DEFAULT:

Definition is such that:

  • All values considered "empty" (as per NON_EMPTY) are excluded;
  • Primitive default values are excluded, which are defined such that:
    • Number: 0;
    • Boolean: false;
    • String: '';
    • BigInt: BigInt(0);

NON_EMPTY

NON_EMPTY:

Value that indicates that only properties with null value, or what is considered empty, are not to be included. Definition of emptiness is data type specific; see below for details on actual handling.

Default emptiness for all types includes:

  • null values;
  • For Set and Map, method size() is called;
  • For Array, empty arrays are ones with length of 0;
  • For String, empty strings are ones with length of 0.

NON_NULL

NON_NULL:

Value that indicates that only properties with non-null values are to be included.

Generated using TypeDoc