Package jodd.json
Class JsonSerializer.Defaults
java.lang.Object
jodd.json.JsonSerializer.Defaults
- Enclosing class:
JsonSerializer
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic StringSpecifies if 'class' metadata is used and its value.static booleanDefines default behavior of aJsonSerializer.static final Stringstatic String[]List of excluded types names for serialization.static Class[]List of excluded types for serialization.static booleanSets the strict JSON encoding. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
DEFAULT_CLASS_METADATA_NAME
- See Also:
-
deepSerialization
public static boolean deepSerializationDefines default behavior of aJsonSerializer. If set totrue, objects will be serialized deep, so all collections and arrays will get serialized. -
excludedTypes
List of excluded types for serialization. -
excludedTypeNames
List of excluded types names for serialization. Type name can contain wildcards (*and?). -
strictStringEncoding
public static boolean strictStringEncodingSets 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
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.
-
-
Constructor Details
-
Defaults
public Defaults()
-