N - - The expected type of JSON Node.P - - The expected type of JSON Parser.public interface JsonObjectMapper<N,P>
| Modifier and Type | Method and Description |
|---|---|
static ResolvableType |
buildResolvableType(Class<?> targetClass,
Class<?> contentClass,
Class<?> keyClass) |
default <T> T |
fromJson(Object json,
Class<T> valueType) |
default <T> T |
fromJson(Object json,
Map<String,Object> javaTypes) |
default <T> T |
fromJson(Object json,
ResolvableType valueType)
Deserialize a JSON to an expected
ResolvableType. |
default <T> T |
fromJson(P parser,
Type valueType) |
default void |
populateJavaTypes(Map<String,Object> map,
Object object) |
default String |
toJson(Object value) |
default void |
toJson(Object value,
Writer writer) |
default N |
toJsonNode(Object value) |
default String toJson(Object value) throws IOException
IOExceptiondefault void toJson(Object value, Writer writer) throws IOException
IOExceptiondefault N toJsonNode(Object value) throws IOException
IOExceptiondefault <T> T fromJson(Object json, Class<T> valueType) throws IOException
IOExceptiondefault <T> T fromJson(Object json, ResolvableType valueType) throws IOException
ResolvableType.T - the expected object typejson - the JSON to deserializevalueType - the ResolvableType for the target object.IOException - a JSON parsing exceptiondefault <T> T fromJson(Object json, Map<String,Object> javaTypes) throws IOException
IOExceptiondefault <T> T fromJson(P parser, Type valueType) throws IOException
IOException