org.codehaus.jackson.map
Class JsonSerializer<T>

java.lang.Object
  extended by org.codehaus.jackson.map.JsonSerializer<T>
Direct Known Subclasses:
ArraySerializers.BooleanArraySerializer, ArraySerializers.ByteArraySerializer, ArraySerializers.CharArraySerializer, ArraySerializers.DoubleArraySerializer, ArraySerializers.FloatArraySerializer, ArraySerializers.IntArraySerializer, ArraySerializers.LongArraySerializer, ArraySerializers.ObjectArraySerializer, ArraySerializers.ShortArraySerializer, ArraySerializers.StringArraySerializer, BasicSerializerFactory.BooleanSerializer, BasicSerializerFactory.CalendarSerializer, BasicSerializerFactory.ClassSerializer, BasicSerializerFactory.DoubleSerializer, BasicSerializerFactory.EnumSerializer, BasicSerializerFactory.FloatSerializer, BasicSerializerFactory.IntegerSerializer, BasicSerializerFactory.IntLikeSerializer, BasicSerializerFactory.LongSerializer, BasicSerializerFactory.NullSerializer, BasicSerializerFactory.NumberSerializer, BasicSerializerFactory.SerializableSerializer, BasicSerializerFactory.SqlDateSerializer, BasicSerializerFactory.SqlTimeSerializer, BasicSerializerFactory.StringLikeSerializer, BasicSerializerFactory.StringSerializer, BasicSerializerFactory.UtilDateSerializer, BeanSerializer, ContainerSerializers.CollectionSerializer, ContainerSerializers.EnumMapSerializer, ContainerSerializers.EnumSetSerializer, ContainerSerializers.IndexedListSerializer, ContainerSerializers.IterableSerializer, ContainerSerializers.IteratorSerializer, ContainerSerializers.MapSerializer, FailingSerializer, JsonValueSerializer, StdKeySerializer, ToStringSerializer

public abstract class JsonSerializer<T>
extends java.lang.Object

Abstract class that defines API used by ObjectMapper (and other chained JsonSerializers too) to serialize Objects of arbitrary types into JSON, using provided JsonGenerator.


Constructor Summary
JsonSerializer()
           
 
Method Summary
abstract  void serialize(T value, JsonGenerator jgen, SerializerProvider provider)
          Method that can be called to ask implementation to serialize values of type this serializer handles.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsonSerializer

public JsonSerializer()
Method Detail

serialize

public abstract void serialize(T value,
                               JsonGenerator jgen,
                               SerializerProvider provider)
                        throws java.io.IOException,
                               JsonProcessingException
Method that can be called to ask implementation to serialize values of type this serializer handles.

Parameters:
value - Value to serialize; can not be null.
jgen - Generator used to output resulting Json content
provider - Provider that can be used to get serializers for serializing Objects value contains, if any.
Throws:
java.io.IOException
JsonProcessingException