Interface JsonObjectMapper<N,P>
- Type Parameters:
N
- - The expected type of JSON Node.P
- - The expected type of JSON Parser.
- All Known Implementing Classes:
AbstractJacksonJsonObjectMapper
,Jackson2JsonObjectMapper
public interface JsonObjectMapper<N,P>
Strategy interface to convert an Object to/from the JSON representation.
- Since:
- 3.0
- Author:
- Artem Bilan
-
Method Summary
Modifier and TypeMethodDescriptiondefault <T> T
default <T> T
default <T> T
fromJson
(Object json, ResolvableType valueType) Deserialize a JSON to an expectedResolvableType
.default <T> T
default void
populateJavaTypes
(Map<String, Object> map, Object object) default String
default void
default N
toJsonNode
(Object value)
-
Method Details
-
toJson
- Throws:
IOException
-
toJson
- Throws:
IOException
-
toJsonNode
- Throws:
IOException
-
fromJson
- Throws:
IOException
-
fromJson
Deserialize a JSON to an expectedResolvableType
.- 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- Since:
- 5.2
-
fromJson
- Throws:
IOException
-
fromJson
- Throws:
IOException
-
populateJavaTypes
-