Package jodd.json

Class JsonSerializer.Defaults

java.lang.Object
jodd.json.JsonSerializer.Defaults
Enclosing class:
JsonSerializer

public static class JsonSerializer.Defaults extends Object
  • Field Details

    • DEFAULT_CLASS_METADATA_NAME

      public static final String DEFAULT_CLASS_METADATA_NAME
      See Also:
    • deepSerialization

      public static boolean deepSerialization
      Defines default behavior of a JsonSerializer. If set to true, objects will be serialized deep, so all collections and arrays will get serialized.
    • excludedTypes

      public static Class[] excludedTypes
      List of excluded types for serialization.
    • excludedTypeNames

      public static 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 to false.
    • classMetadataName

      public static String classMetadataName
      Specifies if 'class' metadata is used and its value. When set, class metadata is used by JsonSerializer and all objects will have additional field with the class type in the resulting JSON. JsonParser will also consider this flag to build correct object type. If null, class information is not used.
  • Constructor Details

    • Defaults

      public Defaults()