public interface JSONObjectMapper
JSONObjectMapper that tells the REST
client how to convert from String to JSON and vice versa.| Modifier and Type | Method and Description |
|---|---|
<T> T |
convertValue(Object fromValue,
Class<T> toValueType)
Converts a value from an object to another type.
|
<T> T |
convertValue(Object fromValue,
TypeReference<T> toValueTypeRef)
Converts a value from an object to another type.
|
<T> T |
fromJSON(String json,
Class<T> valueType)
Converts a JSON string to a type.
|
<T> T |
fromJSON(String json,
TypeReference<T> valueTypeRef)
Converts a JSON string to a type.
|
String |
toJSON(Object object)
Converts an object to JSON.
|
<T> T convertValue(Object fromValue, Class<T> toValueType)
T - The type of the destination instance.fromValue - The object that would be converted.toValueType - The destination type.<T> T convertValue(Object fromValue, TypeReference<T> toValueTypeRef)
T - The type of the destination instance.fromValue - The object that would be converted.toValueTypeRef - Reference to the destination type.<T> T fromJSON(String json, Class<T> valueType)
T - The type to convert the JSON to.json - The JSON as string.valueType - The type as class type that the JSON will be converted to.<T> T fromJSON(String json, TypeReference<T> valueTypeRef)
T - The type to convert the JSON to.json - The JSON as string.valueTypeRef - The type as reference type that the JSON will be converted to.Copyright © 2011–2019 Everit Kft.. All rights reserved.