public class DefaultGsonObjectMapper extends Object implements JsonObjectMapper
Gson configuration for serialization and deserialization JSON
operations.
When none is explicitly set, this will be set.
| Constructor and Description |
|---|
DefaultGsonObjectMapper() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
fromJson(String value,
Class<T> valueType)
Perform deserialization from JSON format string to the given type object as argument.
|
String |
toJson(Object value)
Perform serialization from object to JSON format string.
|
public <T> T fromJson(String value, Class<T> valueType)
JsonObjectMapperfromJson in interface JsonObjectMapperT - the type object to convertvalue - the JSON formatvalueType - the object type to convertpublic String toJson(Object value)
JsonObjectMappertoJson in interface JsonObjectMappervalue - the object to convertCopyright © 2024. All rights reserved.