public class JacksonJson extends Object
| Constructor and Description |
|---|
JacksonJson() |
JacksonJson(com.fasterxml.jackson.databind.ObjectMapper mapper) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
deserialize(String body,
TypeRef returnType)
Deserialize the given JSON string to Java object.
|
com.fasterxml.jackson.databind.ObjectMapper |
getMapper() |
String |
serialize(Object obj)
Serialize the given Java object into JSON string.
|
public JacksonJson()
public JacksonJson(com.fasterxml.jackson.databind.ObjectMapper mapper)
public com.fasterxml.jackson.databind.ObjectMapper getMapper()
public String serialize(Object obj) throws com.fasterxml.jackson.core.JsonProcessingException
com.fasterxml.jackson.core.JsonProcessingExceptionpublic <T> T deserialize(String body, TypeRef returnType) throws IOException
body - The JSON stringreturnType - The type to deserialize inotIOExceptionCopyright © 2023 Optimaize GmbH, Switzerland. All rights reserved.