N
- - The expected type of JSON Node.P
- - The expected type of JSON Parser.J
- - The expected type of Java Type representation.public abstract class AbstractJacksonJsonObjectMapper<N,P,J> extends Object implements JsonObjectMapper<N,P>, BeanClassLoaderAware
JsonObjectMapper
implementations.Modifier and Type | Field and Description |
---|---|
protected static Collection<Class<?>> |
SUPPORTED_JSON_TYPES |
Constructor and Description |
---|
AbstractJacksonJsonObjectMapper() |
Modifier and Type | Method and Description |
---|---|
protected abstract J |
constructType(Type type) |
protected J |
createJavaType(Map<String,Object> javaTypes,
String javaTypeKey) |
protected abstract J |
extractJavaType(Map<String,Object> javaTypes) |
<T> T |
fromJson(Object json,
Class<T> valueType) |
protected abstract <T> T |
fromJson(Object json,
J type) |
<T> T |
fromJson(Object json,
Map<String,Object> javaTypes) |
<T> T |
fromJson(Object json,
ResolvableType valueType)
Deserialize a JSON to an expected
ResolvableType . |
protected ClassLoader |
getClassLoader() |
void |
setBeanClassLoader(ClassLoader classLoader) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
fromJson, populateJavaTypes, toJson, toJson, toJsonNode
protected static final Collection<Class<?>> SUPPORTED_JSON_TYPES
public void setBeanClassLoader(ClassLoader classLoader)
setBeanClassLoader
in interface BeanClassLoaderAware
protected ClassLoader getClassLoader()
public <T> T fromJson(Object json, Class<T> valueType) throws IOException
fromJson
in interface JsonObjectMapper<N,P>
IOException
public <T> T fromJson(Object json, ResolvableType valueType) throws IOException
JsonObjectMapper
ResolvableType
.fromJson
in interface JsonObjectMapper<N,P>
T
- the expected object typejson
- the JSON to deserializevalueType
- the ResolvableType
for the target object.IOException
- a JSON parsing exceptionpublic <T> T fromJson(Object json, Map<String,Object> javaTypes) throws IOException
fromJson
in interface JsonObjectMapper<N,P>
IOException
protected abstract <T> T fromJson(Object json, J type) throws IOException
IOException