public abstract class AbstractObjectMapper<T> extends java.lang.Object implements ObjectMapper<T>
ObjectMapper. It delegates the serialization/deserialization to a serializer/deserializer.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractObjectMapper(java.lang.String rootName) |
| Modifier and Type | Method and Description |
|---|---|
protected JsonDeserializer<T> |
getDeserializer() |
protected JsonSerializer<T> |
getSerializer() |
protected abstract JsonDeserializer<T> |
newDeserializer()
Instantiates a new deserializer
|
protected abstract JsonSerializer<T> |
newSerializer()
Instantiates a new serializer
|
T |
read(java.lang.String in)
Reads a JSON input into an object.
|
T |
read(java.lang.String in,
JsonDeserializationContext ctx)
Reads a JSON input into an object.
|
java.lang.String |
write(T value)
Writes an object to JSON.
|
java.lang.String |
write(T value,
JsonSerializationContext ctx)
Writes an object to JSON.
|
public T read(java.lang.String in) throws JsonDeserializationException
ObjectReaderread in interface ObjectReader<T>in - JSON input to readJsonDeserializationException - if an exception occurs while reading the inputpublic T read(java.lang.String in, JsonDeserializationContext ctx) throws JsonDeserializationException
ObjectReaderread in interface ObjectReader<T>in - JSON input to readctx - Context for the full reading processJsonDeserializationException - if an exception occurs while reading the inputprotected JsonDeserializer<T> getDeserializer()
protected abstract JsonDeserializer<T> newDeserializer()
public java.lang.String write(T value) throws JsonSerializationException
ObjectWriterwrite in interface ObjectWriter<T>value - Object to writeJsonSerializationException - if an exception occurs while writing the outputpublic java.lang.String write(T value, JsonSerializationContext ctx) throws JsonSerializationException
ObjectWriterwrite in interface ObjectWriter<T>value - Object to writectx - Context for the full writing processJsonSerializationException - if an exception occurs while writing the outputprotected JsonSerializer<T> getSerializer()
protected abstract JsonSerializer<T> newSerializer()
Copyright © 2014. All Rights Reserved.