Package com.dslplatform.json
Enum CompiledJson.ObjectFormatPolicy
java.lang.Object
java.lang.Enum<CompiledJson.ObjectFormatPolicy>
com.dslplatform.json.CompiledJson.ObjectFormatPolicy
- All Implemented Interfaces:
Serializable,Comparable<CompiledJson.ObjectFormatPolicy>,java.lang.constant.Constable
- Enclosing class:
CompiledJson
Class level tuning for object format serialization behavior.
DEFAULT will inherit the runtime setting while other ones will always serialize object in
specific way regardless of the runtime setting
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionInherit the serialization policy from DslJson omitDefaults settingSerialize only properties marked with annotations.Always serialize all properties regardless of DslJson omitDefaults settingSerialize minimal set of properties (only required ones) regardless of DslJson omitDefaults setting -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this type with the specified name.static CompiledJson.ObjectFormatPolicy[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
DEFAULT
Inherit the serialization policy from DslJson omitDefaults setting -
MINIMAL
Serialize minimal set of properties (only required ones) regardless of DslJson omitDefaults setting -
FULL
Always serialize all properties regardless of DslJson omitDefaults setting -
EXPLICIT
Serialize only properties marked with annotations. It will respect the omitDefault setting and serialize them accordingly.
-
-
Constructor Details
-
ObjectFormatPolicy
private ObjectFormatPolicy()
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-