@ConfigurationProperties(value="jackson") public class JacksonConfiguration extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_ARRAYSIZETHRESHOLD
The default array size threshold value.
|
static java.lang.String |
PROPERTY_MODULE_SCAN
The property used to enable module scan.
|
static java.lang.String |
PROPERTY_USE_BEAN_INTROSPECTION
The property used to enable bean introspection.
|
Constructor and Description |
---|
JacksonConfiguration() |
Modifier and Type | Method and Description |
---|---|
static <T> com.fasterxml.jackson.databind.JavaType |
constructType(Argument<T> type,
com.fasterxml.jackson.databind.type.TypeFactory typeFactory)
Constructors a JavaType for the given argument and type factory.
|
int |
getArraySizeThreshold() |
java.lang.String |
getDateFormat() |
com.fasterxml.jackson.databind.ObjectMapper.DefaultTyping |
getDefaultTyping() |
java.util.Map<com.fasterxml.jackson.databind.DeserializationFeature,java.lang.Boolean> |
getDeserializationSettings() |
java.util.Map<com.fasterxml.jackson.core.JsonGenerator.Feature,java.lang.Boolean> |
getGeneratorSettings() |
java.util.Locale |
getLocale() |
java.util.Map<com.fasterxml.jackson.databind.MapperFeature,java.lang.Boolean> |
getMapperSettings() |
java.util.Map<com.fasterxml.jackson.core.JsonParser.Feature,java.lang.Boolean> |
getParserSettings() |
com.fasterxml.jackson.databind.PropertyNamingStrategy |
getPropertyNamingStrategy() |
com.fasterxml.jackson.annotation.JsonInclude.Include |
getSerializationInclusion() |
java.util.Map<com.fasterxml.jackson.databind.SerializationFeature,java.lang.Boolean> |
getSerializationSettings() |
java.util.TimeZone |
getTimeZone() |
boolean |
isBeanIntrospectionModule()
Whether the
BeanIntrospection should be used for reflection free object serialialization/deserialialization. |
boolean |
isModuleScan()
Whether Jackson modules should be scanned for.
|
void |
setArraySizeThreshold(int arraySizeThreshold)
Sets the array size threshold for data binding.
|
void |
setBeanIntrospectionModule(boolean beanIntrospectionModule)
Whether the
BeanIntrospection should be used for reflection free object serialialization/deserialialization. |
void |
setDateFormat(java.lang.String dateFormat)
Sets the default date format to use.
|
void |
setDefaultTyping(com.fasterxml.jackson.databind.ObjectMapper.DefaultTyping defaultTyping)
Sets the global defaultTyping using for Polymorphic handling.
|
void |
setDeserialization(java.util.Map<com.fasterxml.jackson.databind.DeserializationFeature,java.lang.Boolean> deserialization)
Sets the deserialization features to use.
|
void |
setGenerator(java.util.Map<com.fasterxml.jackson.core.JsonGenerator.Feature,java.lang.Boolean> generator)
Sets the generator features to use.
|
void |
setLocale(java.util.Locale locale)
Sets the locale to use.
|
void |
setMapper(java.util.Map<com.fasterxml.jackson.databind.MapperFeature,java.lang.Boolean> mapper)
Sets the object mapper features to use.
|
void |
setModuleScan(boolean moduleScan)
Sets whether to scan for modules or not (defaults to true).
|
void |
setParser(java.util.Map<com.fasterxml.jackson.core.JsonParser.Feature,java.lang.Boolean> parser)
Sets the parser features to use.
|
void |
setPropertyNamingStrategy(com.fasterxml.jackson.databind.PropertyNamingStrategy propertyNamingStrategy)
Sets the property naming strategy.
|
void |
setSerialization(java.util.Map<com.fasterxml.jackson.databind.SerializationFeature,java.lang.Boolean> serialization)
Sets the serialization features to use.
|
void |
setSerializationInclusion(com.fasterxml.jackson.annotation.JsonInclude.Include serializationInclusion)
Sets the serialization inclusion mode.
|
void |
setTimeZone(java.util.TimeZone timeZone)
Sets the timezone to use.
|
public static final int DEFAULT_ARRAYSIZETHRESHOLD
public static final java.lang.String PROPERTY_MODULE_SCAN
public static final java.lang.String PROPERTY_USE_BEAN_INTROSPECTION
public boolean isBeanIntrospectionModule()
BeanIntrospection
should be used for reflection free object serialialization/deserialialization.public void setBeanIntrospectionModule(boolean beanIntrospectionModule)
BeanIntrospection
should be used for reflection free object serialialization/deserialialization.beanIntrospectionModule
- True if it shouldpublic boolean isModuleScan()
public void setModuleScan(boolean moduleScan)
moduleScan
- True if module scan should be enabledpublic com.fasterxml.jackson.annotation.JsonInclude.Include getSerializationInclusion()
public com.fasterxml.jackson.databind.ObjectMapper.DefaultTyping getDefaultTyping()
public java.util.Locale getLocale()
public java.util.TimeZone getTimeZone()
public java.lang.String getDateFormat()
public java.util.Map<com.fasterxml.jackson.databind.SerializationFeature,java.lang.Boolean> getSerializationSettings()
public java.util.Map<com.fasterxml.jackson.databind.DeserializationFeature,java.lang.Boolean> getDeserializationSettings()
public java.util.Map<com.fasterxml.jackson.databind.MapperFeature,java.lang.Boolean> getMapperSettings()
public java.util.Map<com.fasterxml.jackson.core.JsonParser.Feature,java.lang.Boolean> getParserSettings()
public java.util.Map<com.fasterxml.jackson.core.JsonGenerator.Feature,java.lang.Boolean> getGeneratorSettings()
public int getArraySizeThreshold()
public com.fasterxml.jackson.databind.PropertyNamingStrategy getPropertyNamingStrategy()
public void setDateFormat(java.lang.String dateFormat)
dateFormat
- The date formatpublic void setLocale(java.util.Locale locale)
locale
- The localepublic void setTimeZone(java.util.TimeZone timeZone)
timeZone
- The timezonepublic void setArraySizeThreshold(int arraySizeThreshold)
arraySizeThreshold
- The array size thresholdpublic void setSerialization(java.util.Map<com.fasterxml.jackson.databind.SerializationFeature,java.lang.Boolean> serialization)
serialization
- The serialization features.public void setDeserialization(java.util.Map<com.fasterxml.jackson.databind.DeserializationFeature,java.lang.Boolean> deserialization)
deserialization
- The deserialiation features.public void setMapper(java.util.Map<com.fasterxml.jackson.databind.MapperFeature,java.lang.Boolean> mapper)
mapper
- The object mapper featurespublic void setParser(java.util.Map<com.fasterxml.jackson.core.JsonParser.Feature,java.lang.Boolean> parser)
parser
- The parser featurespublic void setGenerator(java.util.Map<com.fasterxml.jackson.core.JsonGenerator.Feature,java.lang.Boolean> generator)
generator
- The generator featurespublic void setSerializationInclusion(com.fasterxml.jackson.annotation.JsonInclude.Include serializationInclusion)
serializationInclusion
- The serialization inclusion modepublic void setDefaultTyping(com.fasterxml.jackson.databind.ObjectMapper.DefaultTyping defaultTyping)
defaultTyping
- The defaultTypingpublic void setPropertyNamingStrategy(com.fasterxml.jackson.databind.PropertyNamingStrategy propertyNamingStrategy)
propertyNamingStrategy
- The property naming strategypublic static <T> com.fasterxml.jackson.databind.JavaType constructType(@NonNull Argument<T> type, @NonNull com.fasterxml.jackson.databind.type.TypeFactory typeFactory)
T
- The generic typetype
- The typetypeFactory
- The type factory