Package org.jdbi.v3.jackson2
Class Jackson2Config
java.lang.Object
org.jdbi.v3.jackson2.Jackson2Config
- All Implemented Interfaces:
- JdbiConfig<Jackson2Config>
Configuration class for Jackson 2 integration.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionReturns a copy of this configuration object.Class<?>Returns the current@JsonViewused for deserialization.com.fasterxml.jackson.databind.ObjectMapperReturns the object mapper to use for json conversion.Class<?>Returns the current@JsonViewused for serialization.setDeserializationView(Class<?> deserializationView) Set the@JsonViewused to deserialize.setMapper(com.fasterxml.jackson.databind.ObjectMapper mapper) Set theObjectMapperto use for json conversion.setSerializationView(Class<?> serializationView) Set the@JsonViewused to serialize.Set both serialization and deserialization@JsonViewto the given class.Methods inherited from class java.lang.Objectequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jdbi.v3.core.config.JdbiConfigsetRegistry
- 
Constructor Details- 
Jackson2Configpublic Jackson2Config()
 
- 
- 
Method Details- 
setMapperSet theObjectMapperto use for json conversion.- Parameters:
- mapper- the mapper to use
- Returns:
- this
 
- 
getMapperpublic com.fasterxml.jackson.databind.ObjectMapper getMapper()Returns the object mapper to use for json conversion.- Returns:
- the object mapper to use for json conversion.
 
- 
setViewSet both serialization and deserialization@JsonViewto the given class.- Parameters:
- view- the view class
- Returns:
- this
 
- 
setSerializationViewSet the@JsonViewused to serialize.- Parameters:
- serializationView- the serialization view
- Returns:
- this
 
- 
getSerializationViewReturns the current@JsonViewused for serialization.- Returns:
- The current @JsonViewused for serialization.
 
- 
setDeserializationViewSet the@JsonViewused to deserialize.- Parameters:
- deserializationView- the serialization view
- Returns:
- this
 
- 
getDeserializationViewReturns the current@JsonViewused for deserialization.- Returns:
- the current @JsonViewused for deserialization.
 
- 
createCopyDescription copied from interface:JdbiConfigReturns a copy of this configuration object. Changes to the copy should not modify the original, and vice-versa.- Specified by:
- createCopyin interface- JdbiConfig<Jackson2Config>
- Returns:
- a copy of this configuration object.
 
 
-