|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<JsonSerialize.Inclusion> com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion
public static enum JsonSerialize.Inclusion
Enumeration used with JsonSerialize.include()
property
to define which properties
of Java Beans are to be included in serialization
Enum Constant Summary | |
---|---|
ALWAYS
Value that indicates that properties are to be always included, independent of value |
|
NON_DEFAULT
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. |
|
NON_EMPTY
Value that indicates that only properties that have values that values that are null or what is considered empty are not to be included. |
|
NON_NULL
Value that indicates that only properties with non-null values are to be included. |
Method Summary | |
---|---|
static JsonSerialize.Inclusion |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static JsonSerialize.Inclusion[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final JsonSerialize.Inclusion ALWAYS
public static final JsonSerialize.Inclusion NON_NULL
public static final JsonSerialize.Inclusion NON_DEFAULT
Map
s, since they have no default values;
and if used, works same as ALWAYS
.
public static final JsonSerialize.Inclusion NON_EMPTY
Collection
s and Map
s,
method isEmpty()
is called;
String
s, 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
Method Detail |
---|
public static JsonSerialize.Inclusion[] values()
for (JsonSerialize.Inclusion c : JsonSerialize.Inclusion.values()) System.out.println(c);
public static JsonSerialize.Inclusion valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |