Package jodd.json
Class JsonSerializer.Defaults
- java.lang.Object
-
- jodd.json.JsonSerializer.Defaults
-
- Enclosing class:
- JsonSerializer
public static class JsonSerializer.Defaults extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringclassMetadataNameSpecifies if 'class' metadata is used and its value.static booleandeepSerializationDefines default behavior of aJsonSerializer.static java.lang.StringDEFAULT_CLASS_METADATA_NAMEstatic java.lang.String[]excludedTypeNamesList of excluded types names for serialization.static java.lang.Class[]excludedTypesList of excluded types for serialization.static booleanstrictStringEncodingSets the strict JSON encoding.
-
Constructor Summary
Constructors Constructor Description Defaults()
-
-
-
Field Detail
-
DEFAULT_CLASS_METADATA_NAME
public static final java.lang.String DEFAULT_CLASS_METADATA_NAME
- See Also:
- Constant Field Values
-
deepSerialization
public static boolean deepSerialization
Defines default behavior of aJsonSerializer. If set totrue, objects will be serialized deep, so all collections and arrays will get serialized.
-
excludedTypes
public static java.lang.Class[] excludedTypes
List of excluded types for serialization.
-
excludedTypeNames
public static java.lang.String[] excludedTypeNames
List of excluded types names for serialization. Type name can contain wildcards (*and?).
-
strictStringEncoding
public static boolean strictStringEncoding
Sets the strict JSON encoding. JSON specification specifies that certain characters should be escaped (see: http://json.org/). However, in the real world, not all needs to be escaped: especially the 'solidus' character (/). If this one is escaped, many things can go wrong, from URLs to Base64 encodings. This flag controls the behavior of strict encoding. By default, the strict encoding is set tofalse.
-
classMetadataName
public static java.lang.String classMetadataName
Specifies if 'class' metadata is used and its value. When set, class metadata is used byJsonSerializerand all objects will have additional field with the class type in the resulting JSON.JsonParserwill also consider this flag to build correct object type. Ifnull, class information is not used.
-
-