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
,JacksonJsonObjectMapper
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, Glenn Renfro
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract J
constructType
(Type type) protected J
createJavaType
(Map<String, Object> javaTypes, String javaTypeKey) protected abstract J
extractJavaType
(Map<String, Object> javaTypes) protected abstract <T> T
<T> T
<T> T
<T> T
fromJson
(Object json, ResolvableType valueType) Deserialize a JSON to an expectedResolvableType
.protected @Nullable ClassLoader
void
setBeanClassLoader
(ClassLoader classLoader) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.integration.support.json.JsonObjectMapper
fromJson, populateJavaTypes, toJson, toJson, toJsonNode
-
Field Details
-
SUPPORTED_JSON_TYPES
-
-
Constructor Details
-
AbstractJacksonJsonObjectMapper
public AbstractJacksonJsonObjectMapper()
-
-
Method Details
-
setBeanClassLoader
- Specified by:
setBeanClassLoader
in interfaceBeanClassLoaderAware
-
getClassLoader
-
fromJson
- Specified by:
fromJson
in interfaceJsonObjectMapper<N,
P> - Throws:
IOException
-
fromJson
Description copied from interface:JsonObjectMapper
Deserialize a JSON to an expectedResolvableType
.- Specified by:
fromJson
in interfaceJsonObjectMapper<N,
P> - Type Parameters:
T
- the expected object type- Parameters:
json
- the JSON to deserializevalueType
- theResolvableType
for the target object.- Returns:
- deserialization result object
- Throws:
IOException
- a JSON parsing exception
-
fromJson
- Specified by:
fromJson
in interfaceJsonObjectMapper<N,
P> - Throws:
IOException
-
createJavaType
-
fromJson
- Throws:
IOException
-
extractJavaType
-
constructType
-