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

java.lang.Object
  extended by org.codehaus.jackson.map.JsonSerializer<java.sql.Date>
      extended by org.codehaus.jackson.map.ser.BasicSerializerFactory.SqlDateSerializer
Enclosing class:
BasicSerializerFactory

public static final class BasicSerializerFactory.SqlDateSerializer
extends JsonSerializer<java.sql.Date>

Compared to regular BasicSerializerFactory.UtilDateSerializer, we do use String representation here. Why? Basically to truncate of time part, since that should not be used by plain SQL date.


Constructor Summary
BasicSerializerFactory.SqlDateSerializer()
           
 
Method Summary
 void serialize(java.sql.Date 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

BasicSerializerFactory.SqlDateSerializer

public BasicSerializerFactory.SqlDateSerializer()
Method Detail

serialize

public void serialize(java.sql.Date 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.sql.Date>
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