public static enum JsonInclude.Include extends Enum<JsonInclude.Include>
JsonIncludeto define which properties of Java Beans are to be included in serialization.
Note: Jackson 1.x had similarly named ("Inclusion") enumeration included
JsonSerialize annotation: it is not deprecated
and this value used instead.
|Enum Constant and Description|
Value that indicates that property is to be always included, independent of value of the property.
Value that indicates that only properties that have values that differ from default settings (meaning values they have when Bean is constructed with its no-arguments constructor) are to be included.
Value that indicates that only properties that have values that values that are null or what is considered empty are not to be included.
Value that indicates that only properties with non-null values are to be included.
|Modifier and Type||Method and Description|
Returns the enum constant of this type with the specified name.
Returns an array containing the constants of this enum type, in the order they are declared.
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
public static final JsonInclude.Include ALWAYS
public static final JsonInclude.Include NON_NULL
public static final JsonInclude.Include NON_DEFAULT
Maps, since they have no default values; and if used, works same as
public static final JsonInclude.Include NON_EMPTY
Default emptiness is defined for following type:
length()is called, and return value of 0 indicates empty String (note that
String.isEmpty()was added in Java 1.6 and as such can not be used by Jackson
Note that this default handling can be overridden by custom
JsonSerializer implementation: if method
is overridden, it will be called to see if non-null values are
considered empty (null is always considered empty).
public static JsonInclude.Include values()
for (JsonInclude.Include c : JsonInclude.Include.values()) System.out.println(c);
public static JsonInclude.Include valueOf(String name)
Copyright © 2012-2013 FasterXML. All Rights Reserved.