Class JacksonDeserializer
java.lang.Object
com.couchbase.columnar.client.java.codec.JacksonDeserializer
- All Implemented Interfaces:
Deserializer
A deserializer backed by Jackson.
Example usage:
var mapper = JsonMapper.builder() .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) .build(); var deserializer = new JacksonDeserializer(mapper);
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> T
deserialize
(TypeRef<T> target, byte[] input) Deserializes raw input into the target type.<T> T
deserialize
(Class<T> target, byte[] input) Deserializes raw input into the target class.toString()
-
Constructor Details
-
JacksonDeserializer
public JacksonDeserializer(com.fasterxml.jackson.databind.ObjectMapper mapper)
-
-
Method Details
-
deserialize
Description copied from interface:Deserializer
Deserializes raw input into the target class.- Specified by:
deserialize
in interfaceDeserializer
- Type Parameters:
T
- the generic type to deserialize into.- Parameters:
target
- the target class.input
- the raw input.- Returns:
- the deserialized output.
- Throws:
IOException
-
deserialize
Description copied from interface:Deserializer
Deserializes raw input into the target type.- Specified by:
deserialize
in interfaceDeserializer
- Type Parameters:
T
- the type to deserialize into.- Parameters:
target
- the target type.input
- the raw input.- Returns:
- the deserialized output.
- Throws:
IOException
-
toString
-