T - is the generic type of the Datatype to serialize.public class DatatypeJsonSerializer<T>
extends com.fasterxml.jackson.databind.JsonSerializer<T>
JsonSerializer based on DatatypeDescriptorManager so every
Datatype supported by DatatypeDescriptorManager can be serialized
to JSON.DatatypeJsonDeserializer| Modifier and Type | Field and Description |
|---|---|
private DatatypeDescriptorManager |
datatypeDescriptorManager |
| Constructor and Description |
|---|
DatatypeJsonSerializer()
The constructor.
|
DatatypeJsonSerializer(DatatypeDescriptorManager datatypeDescriptorManager)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
serialize(T value,
com.fasterxml.jackson.core.JsonGenerator jgen,
com.fasterxml.jackson.databind.SerializerProvider provider) |
<V> void |
serializeGeneric(V value,
com.fasterxml.jackson.core.JsonGenerator jgen,
com.fasterxml.jackson.databind.SerializerProvider provider)
Generic and recursive implementation of
serialize(Object, JsonGenerator, SerializerProvider). |
void |
setDatatypeDescriptorManager(DatatypeDescriptorManager datatypeDescriptorManager) |
private DatatypeDescriptorManager datatypeDescriptorManager
public DatatypeJsonSerializer()
public DatatypeJsonSerializer(DatatypeDescriptorManager datatypeDescriptorManager)
datatypeDescriptorManager - is the DatatypeDescriptorManager instance to use.@Inject public void setDatatypeDescriptorManager(DatatypeDescriptorManager datatypeDescriptorManager)
datatypeDescriptorManager - is the DatatypeDescriptorManager to Inject.public <V> void serializeGeneric(V value,
com.fasterxml.jackson.core.JsonGenerator jgen,
com.fasterxml.jackson.databind.SerializerProvider provider)
throws IOException
serialize(Object, JsonGenerator, SerializerProvider).V - is the generic type of value.value - is the value to serialize.jgen - is the JsonGenerator.provider - is the SerializerProvider.IOException - in case of an error writing the serialized data.public void serialize(T value, com.fasterxml.jackson.core.JsonGenerator jgen, com.fasterxml.jackson.databind.SerializerProvider provider) throws IOException, com.fasterxml.jackson.core.JsonProcessingException
serialize in class com.fasterxml.jackson.databind.JsonSerializer<T>IOExceptioncom.fasterxml.jackson.core.JsonProcessingExceptionCopyright © 2001–2015 mmm-Team. All rights reserved.