Class JacksonSerializer
- java.lang.Object
-
- com.oracle.bmc.serialization.jackson.JacksonSerializer
-
- All Implemented Interfaces:
Serializer
public final class JacksonSerializer extends Object implements Serializer
Implementation of Serializer for Jackson.Use the
getDefaultSerializer()to get the instance with default configuration for java sdk.Exposed only for internal use.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static com.fasterxml.jackson.databind.ObjectMappergetDefaultObjectMapper()Get the instance of Object Mapper with default configuration for java sdk serialization.static JacksonSerializergetDefaultSerializer()Get the instance of Jackson JSON mapper with default configuration for java sdk serialization.<T> TreadValue(byte[] bytes, Class<T> type)<T> TreadValue(String s, Class<T> type)StringwriteValueAsString(Object o)
-
-
-
Method Detail
-
readValue
public <T> T readValue(String s, Class<T> type) throws IOException
- Specified by:
readValuein interfaceSerializer- Throws:
IOException
-
readValue
public <T> T readValue(byte[] bytes, Class<T> type) throws IOException- Specified by:
readValuein interfaceSerializer- Throws:
IOException
-
writeValueAsString
public String writeValueAsString(Object o) throws IOException
- Specified by:
writeValueAsStringin interfaceSerializer- Throws:
IOException
-
getDefaultSerializer
public static JacksonSerializer getDefaultSerializer()
Get the instance of Jackson JSON mapper with default configuration for java sdk serialization.- Returns:
- JSON mapper to handle JSON serialization.
-
getDefaultObjectMapper
public static com.fasterxml.jackson.databind.ObjectMapper getDefaultObjectMapper()
Get the instance of Object Mapper with default configuration for java sdk serialization.- Returns:
- Object mapper to handle JSON serialization
-
-