public class JacksonSerializer extends Object implements TextSerializer, ObjectConverter
| Modifier and Type | Class and Description |
|---|---|
static class |
JacksonSerializer.Builder
Created by epoitras on 10/16/15.
|
| Constructor and Description |
|---|
JacksonSerializer(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Constructor of the Jackson Serializer from an object mapper.
|
| Modifier and Type | Method and Description |
|---|---|
<T> T |
convert(Object o,
Class<T> clazz)
Convert object to value.
|
static JacksonSerializer.Builder |
newBuilder() |
static JacksonSerializer.Builder |
newEmptyBuilder() |
<T> T |
read(com.fasterxml.jackson.core.JsonParser r,
Class<T> clazz)
Read Object from parser.
|
<T> T |
read(Reader from,
Class<T> clazz)
Read Json from parser.
|
<T> T |
read(String from,
Class<T> clazz)
Read Json from parser.
|
void |
write(Writer to,
Object o)
Serialize an object to a writer.
|
String |
writeToString(Object o)
Stream Value to String.
|
public JacksonSerializer(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
public static JacksonSerializer.Builder newBuilder()
public static JacksonSerializer.Builder newEmptyBuilder()
public <T> T read(com.fasterxml.jackson.core.JsonParser r,
Class<T> clazz)
public <T> T read(String from, Class<T> clazz)
read in interface TextSerializerpublic <T> T read(Reader from, Class<T> clazz)
read in interface TextSerializerpublic void write(Writer to, Object o)
TextSerializerwrite in interface TextSerializerpublic String writeToString(Object o)
TextSerializerwriteToString in interface TextSerializerpublic <T> T convert(Object o, Class<T> clazz)
convert in interface ObjectConverterCopyright © 2016. All rights reserved.