public class JoddJsonDefaults
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_CLASS_METADATA_NAME |
| Constructor and Description |
|---|
JoddJsonDefaults() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getClassMetadataName() |
java.lang.String[] |
getExcludedTypeNames() |
java.lang.Class[] |
getExcludedTypes() |
java.lang.Class<? extends java.lang.annotation.Annotation> |
getJsonAnnotation()
Returns the annotation used for marking the properties.
|
boolean |
isDeepSerialization() |
boolean |
isSerializationSubclassAware() |
boolean |
isStrictStringEncoding() |
boolean |
isUseAltPathsByParser() |
void |
setClassMetadataName(java.lang.String classMetadataName)
Specifies if 'class' metadata is used and its value.
|
void |
setDeepSerialization(boolean deepSerialization)
Defines default behavior of a
JsonSerializer. |
void |
setExcludedTypeNames(java.lang.String... excludedTypeNames)
Defines a list of excluded types names for serialization.
|
void |
setExcludedTypes(java.lang.Class... excludedTypes)
Defines list of excluded types for serialization.
|
void |
setJsonAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> jsonAnnotation)
Defines new custom JSON annotation for marking the JSON properties that are going to be serialized.
|
void |
setSerializationSubclassAware(boolean serializationSubclassAware)
When set searches for first annotated class or interface and use it's data.
|
void |
setStrictStringEncoding(boolean strictStringEncoding)
Sets the strict JSON encoding.
|
void |
setUseAltPathsByParser(boolean useAltPathsByParser)
Defines if parser will use extended paths information
and path matching.
|
public static final java.lang.String DEFAULT_CLASS_METADATA_NAME
public java.lang.Class<? extends java.lang.annotation.Annotation> getJsonAnnotation()
public void setJsonAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> jsonAnnotation)
public java.lang.String getClassMetadataName()
setClassMetadataName(String)public void setClassMetadataName(java.lang.String classMetadataName)
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.public boolean isDeepSerialization()
public void setDeepSerialization(boolean deepSerialization)
JsonSerializer.
If set to true, objects will be serialized
deep, so all collections and arrays will get serialized.public boolean isUseAltPathsByParser()
setUseAltPathsByParser(boolean)public void setUseAltPathsByParser(boolean useAltPathsByParser)
public java.lang.Class[] getExcludedTypes()
setExcludedTypes(Class[])public void setExcludedTypes(java.lang.Class... excludedTypes)
public java.lang.String[] getExcludedTypeNames()
setExcludedTypeNames(String...)public void setExcludedTypeNames(java.lang.String... excludedTypeNames)
* and ?).public boolean isSerializationSubclassAware()
setSerializationSubclassAware(boolean)public void setSerializationSubclassAware(boolean serializationSubclassAware)
public boolean isStrictStringEncoding()
setStrictStringEncoding(boolean)public void setStrictStringEncoding(boolean strictStringEncoding)
false.Copyright © 2003-present Jodd Team