org.codehaus.jackson.map.ser
Class BasicSerializerFactory.CalendarSerializer

java.lang.Object
  extended by org.codehaus.jackson.map.JsonSerializer<java.util.Calendar>
      extended by org.codehaus.jackson.map.ser.BasicSerializerFactory.CalendarSerializer
Enclosing class:
BasicSerializerFactory

public static final class BasicSerializerFactory.CalendarSerializer
extends JsonSerializer<java.util.Calendar>

For time values we should use timestamp, since that is about the only thing that can be reliably converted between date-based objects and json.


Field Summary
static BasicSerializerFactory.CalendarSerializer instance
           
 
Constructor Summary
BasicSerializerFactory.CalendarSerializer()
           
 
Method Summary
 void serialize(java.util.Calendar 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
 

Field Detail

instance

public static final BasicSerializerFactory.CalendarSerializer instance
Constructor Detail

BasicSerializerFactory.CalendarSerializer

public BasicSerializerFactory.CalendarSerializer()
Method Detail

serialize

public void serialize(java.util.Calendar value,
                      JsonGenerator jgen,
                      SerializerProvider provider)
               throws java.io.IOException,
                      JsonGenerationException
Description copied from class: JsonSerializer
Method that can be called to ask implementation to serialize values of type this serializer handles.

Specified by:
serialize in class JsonSerializer<java.util.Calendar>
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
JsonGenerationException