Class CalendarSerializer
- java.lang.Object
-
- com.fasterxml.jackson.databind.JsonSerializer<T>
-
- com.fasterxml.jackson.databind.ser.std.StdSerializer<T>
-
- com.fasterxml.jackson.databind.ser.std.StdScalarSerializer<T>
-
- com.fasterxml.jackson.databind.ser.std.DateTimeSerializerBase<java.util.Calendar>
-
- com.fasterxml.jackson.databind.ser.std.CalendarSerializer
-
- All Implemented Interfaces:
JsonFormatVisitable
,SchemaAware
,ContextualSerializer
,java.io.Serializable
public class CalendarSerializer extends DateTimeSerializerBase<java.util.Calendar>
Standard serializer forCalendar
. As with other time/date types, is configurable to produce timestamps (standard Java 64-bit timestamp) or textual formats (usually ISO-8601).- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer
JsonSerializer.None
-
-
Field Summary
Fields Modifier and Type Field Description static CalendarSerializer
instance
-
Constructor Summary
Constructors Constructor Description CalendarSerializer()
CalendarSerializer(java.lang.Boolean useTimestamp, java.text.DateFormat customFormat)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
serialize(java.util.Calendar value, JsonGenerator g, SerializerProvider provider)
Method that can be called to ask implementation to serialize values of type this serializer handles.CalendarSerializer
withFormat(java.lang.Boolean timestamp, java.text.DateFormat customFormat)
-
Methods inherited from class com.fasterxml.jackson.databind.ser.std.DateTimeSerializerBase
acceptJsonFormatVisitor, createContextual, getSchema, isEmpty
-
Methods inherited from class com.fasterxml.jackson.databind.ser.std.StdScalarSerializer
serializeWithType
-
Methods inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer
getSchema, handledType, wrapAndThrow, wrapAndThrow
-
Methods inherited from class com.fasterxml.jackson.databind.JsonSerializer
getDelegatee, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, unwrappingSerializer, usesObjectId, withFilterId
-
-
-
-
Field Detail
-
instance
public static final CalendarSerializer instance
-
-
Method Detail
-
withFormat
public CalendarSerializer withFormat(java.lang.Boolean timestamp, java.text.DateFormat customFormat)
- Specified by:
withFormat
in classDateTimeSerializerBase<java.util.Calendar>
-
serialize
public void serialize(java.util.Calendar value, JsonGenerator g, SerializerProvider provider) throws java.io.IOException
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 classDateTimeSerializerBase<java.util.Calendar>
- Parameters:
value
- Value to serialize; can not be null.g
- Generator used to output resulting Json contentprovider
- Provider that can be used to get serializers for serializing Objects value contains, if any.- Throws:
java.io.IOException
-
-