Class AbstractJacksonJsonObjectMapper<N,P,J>
java.lang.Object
org.springframework.integration.support.json.AbstractJacksonJsonObjectMapper<N,P,J>
- Type Parameters:
N- - The expected type of JSON Node.P- - The expected type of JSON Parser.J- - The expected type of Java Type representation.
- All Implemented Interfaces:
Aware,BeanClassLoaderAware,JsonObjectMapper<N,P>
- Direct Known Subclasses:
Jackson2JsonObjectMapper
public abstract class AbstractJacksonJsonObjectMapper<N,P,J> extends Object implements JsonObjectMapper<N,P>, BeanClassLoaderAware
Base class for Jackson
JsonObjectMapper implementations.- Since:
- 3.0
- Author:
- Artem Bilan
-
Field Summary
Fields Modifier and Type Field Description protected static Collection<Class<?>>SUPPORTED_JSON_TYPES -
Constructor Summary
Constructors Constructor Description AbstractJacksonJsonObjectMapper() -
Method Summary
Modifier and Type Method Description protected abstract JconstructType(Type type)protected JcreateJavaType(Map<String,Object> javaTypes, String javaTypeKey)protected abstract JextractJavaType(Map<String,Object> javaTypes)protected abstract <T> TfromJson(Object json, J type)<T> TfromJson(Object json, Class<T> valueType)<T> TfromJson(Object json, Map<String,Object> javaTypes)<T> TfromJson(Object json, ResolvableType valueType)Deserialize a JSON to an expectedResolvableType.protected ClassLoadergetClassLoader()voidsetBeanClassLoader(ClassLoader classLoader)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.integration.support.json.JsonObjectMapper
fromJson, populateJavaTypes, toJson, toJson, toJsonNode
-
Field Details
-
Constructor Details
-
AbstractJacksonJsonObjectMapper
public AbstractJacksonJsonObjectMapper()
-
-
Method Details
-
setBeanClassLoader
- Specified by:
setBeanClassLoaderin interfaceBeanClassLoaderAware
-
getClassLoader
-
fromJson
- Specified by:
fromJsonin interfaceJsonObjectMapper<N,P>- Throws:
IOException
-
fromJson
Description copied from interface:JsonObjectMapperDeserialize a JSON to an expectedResolvableType.- Specified by:
fromJsonin interfaceJsonObjectMapper<N,P>- Type Parameters:
T- the expected object type- Parameters:
json- the JSON to deserializevalueType- theResolvableTypefor the target object.- Returns:
- deserialization result object
- Throws:
IOException- a JSON parsing exception
-
fromJson
- Specified by:
fromJsonin interfaceJsonObjectMapper<N,P>- Throws:
IOException
-
createJavaType
-
fromJson
- Throws:
IOException
-
extractJavaType
-
constructType
-