Class CalendarSerializer
java.lang.Object
com.fasterxml.jackson.databind.JsonSerializer<Calendar>
com.fasterxml.jackson.databind.ser.std.StdSerializer<Calendar>
com.fasterxml.jackson.databind.ser.std.StdScalarSerializer<Calendar>
com.fasterxml.jackson.databind.ser.std.DateTimeSerializerBase<Calendar>
com.fasterxml.jackson.databind.ser.std.CalendarSerializer
- All Implemented Interfaces:
JsonFormatVisitable
,SchemaAware
,ContextualSerializer
,Serializable
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).- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer
JsonSerializer.None
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
serialize
(Calendar value, JsonGenerator g, SerializerProvider provider) Method that can be called to ask implementation to serialize values of type this serializer handles.withFormat
(Boolean timestamp, 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, withIgnoredProperties
-
Field Details
-
instance
-
-
Constructor Details
-
CalendarSerializer
public CalendarSerializer() -
CalendarSerializer
-
-
Method Details
-
withFormat
- Specified by:
withFormat
in classDateTimeSerializerBase<Calendar>
-
serialize
public void serialize(Calendar value, JsonGenerator g, SerializerProvider provider) throws 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<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:
IOException
-