public class JacksonObjectMapper extends Object
| Constructor and Description |
|---|
JacksonObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
assign(T target,
byte[] source) |
void |
checkValidJson(byte[] bytes) |
<T> T |
fromJson(byte[] bytes,
Class<T> type) |
<T> T |
fromJson(byte[] bytes,
Class<T> type,
Class<?> view) |
Map<String,String> |
fromJsonToMap(byte[] bytes) |
String |
prettyPrint(Object object) |
String |
prettyPrint(String json) |
byte[] |
toJson(Map<String,String> map) |
byte[] |
toJson(Object object) |
byte[] |
toJson(Object object,
Class<?> serializationView) |
byte[] |
toPrettyJson(Object object,
Class<?> serializationView) |
public JacksonObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
public <T> T fromJson(byte[] bytes,
Class<T> type)
throws IOException
IOExceptionpublic <T> T fromJson(byte[] bytes,
Class<T> type,
Class<?> view)
throws IOException
IOExceptionpublic Map<String,String> fromJsonToMap(byte[] bytes) throws IOException
IOExceptionpublic byte[] toJson(Object object) throws IOException
IOExceptionpublic byte[] toJson(Object object, Class<?> serializationView) throws IOException
IOExceptionpublic byte[] toJson(Map<String,String> map) throws IOException
IOExceptionpublic byte[] toPrettyJson(Object object, Class<?> serializationView) throws IOException
IOExceptionpublic String prettyPrint(Object object) throws IOException
IOExceptionpublic String prettyPrint(String json) throws IOException
IOExceptionpublic void checkValidJson(byte[] bytes)
throws IOException
IOExceptionpublic <T> T assign(T target,
byte[] source)
throws IOException
IOExceptionCopyright © 2021. All rights reserved.