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 SummaryModifier and Type Method Description default <T> TfromJson(Object json, Class<T> valueType)default <T> TfromJson(Object json, Map<String,Object> javaTypes)default <T> TfromJson(Object json, ResolvableType valueType)Deserialize a JSON to an expectedResolvableType.default <T> TfromJson(P parser, Type valueType)default voidpopulateJavaTypes(Map<String,Object> map, Object object)default StringtoJson(Object value)default voidtoJson(Object value, Writer writer)default NtoJsonNode(Object value)
- 
Method Details- 
toJson- Throws:
- IOException
 
- 
toJson- Throws:
- IOException
 
- 
toJsonNode- Throws:
- IOException
 
- 
fromJson- Throws:
- IOException
 
- 
fromJsonDeserialize a JSON to an expectedResolvableType.- Type Parameters:
- T- the expected object type
- Parameters:
- json- the JSON to deserialize
- valueType- the- ResolvableTypefor the target object.
- Returns:
- deserialization result object
- Throws:
- IOException- a JSON parsing exception
- Since:
- 5.2
 
- 
fromJson- Throws:
- IOException
 
- 
fromJson- Throws:
- IOException
 
- 
populateJavaTypes
 
-