JacksonConverterRegistrar@Deprecated public class ObjectToJsonNodeConverter extends java.lang.Object implements TypeConverter<java.lang.Object,com.fasterxml.jackson.databind.JsonNode>
A TypeConverter that can convert objects to JSON with Jackson.
| Constructor and Description |
|---|
ObjectToJsonNodeConverter(javax.inject.Provider<com.fasterxml.jackson.databind.ObjectMapper> objectMapper)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Optional<com.fasterxml.jackson.databind.JsonNode> |
convert(java.lang.Object object,
java.lang.Class<com.fasterxml.jackson.databind.JsonNode> targetType,
ConversionContext context)
Deprecated.
Converts from the given source object type to the target type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconvert, ofpublic ObjectToJsonNodeConverter(javax.inject.Provider<com.fasterxml.jackson.databind.ObjectMapper> objectMapper)
objectMapper - The object mapper provider to read/write JSONpublic java.util.Optional<com.fasterxml.jackson.databind.JsonNode> convert(java.lang.Object object,
java.lang.Class<com.fasterxml.jackson.databind.JsonNode> targetType,
ConversionContext context)
TypeConverterOptional.empty()
in case the object is not convertible by catching any necessary exceptions and failing gracefully.convert in interface TypeConverter<java.lang.Object,com.fasterxml.jackson.databind.JsonNode>object - The object typetargetType - The target type being converted tocontext - The ConversionContext