Class JacksonCodecFactory
java.lang.Object
org.jwcarman.codec.jackson.JacksonCodecFactory
- All Implemented Interfaces:
CodecFactory
Produces JSON codecs backed by a shared Jackson 3.x
ObjectMapper.-
Constructor Summary
ConstructorsConstructorDescriptionJacksonCodecFactory(tools.jackson.databind.ObjectMapper objectMapper) Creates a factory that uses the given mapper for all codecs it produces. -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CodecFactory
create
-
Constructor Details
-
JacksonCodecFactory
public JacksonCodecFactory(tools.jackson.databind.ObjectMapper objectMapper) Creates a factory that uses the given mapper for all codecs it produces.- Parameters:
objectMapper- the mapper to serialize and deserialize with
-
-
Method Details
-
create
Description copied from interface:CodecFactoryCreates a codec for the given type reference, supporting full generic types.- Specified by:
createin interfaceCodecFactory- Type Parameters:
T- the codec's value type- Parameters:
typeRef- the type to create a codec for- Returns:
- a codec for the type
-