Class CalendarSerializer

  • All Implemented Interfaces:
    SchemaAware
    Direct Known Subclasses:
    StdSerializers.CalendarSerializer

    public class CalendarSerializer
    extends ScalarSerializerBase<java.util.Calendar>
    Standard serializer for Calendar. As with other time/date types, is configurable to produce timestamps (standard Java 64-bit timestamp) or textual formats (usually ISO-8601).
    Since:
    1.9 (moved from 'org.codehaus.jackson.map.ser.StdSerializers#CalendarSerializer}
    • Constructor Detail

      • CalendarSerializer

        public 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 SerializerBase<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