T
- The type this serializer should read.public abstract class AbstractJacksonCalendarSerializer<T>
extends com.fasterxml.jackson.databind.ser.std.StdSerializer<T>
Calendar
object as a Jackson
StdSerializer
.
This may be used to specify a deserializer for the new Java date API (e.g. LocalDateTime
) based on
a common conversion logic. This way the logic is split the following way:
General Conversion logic | AbstractTypeConverter subclasses (*CalendarConverter) |
Gson Adapter | AbstractCalendarAdapter subclasses |
Jackson (De)Serializer | AbstractJacksonCalendar(De)Serializer and subclasses |
Modifier | Constructor and Description |
---|---|
protected |
AbstractJacksonCalendarSerializer(Class<T> t)
Constructor needed by the super class.
|
Modifier and Type | Method and Description |
---|---|
protected abstract AbstractTypeConverter<T,Calendar> |
getConverterInstance()
Getter for an instance of the common conversion logic from and to
Calendar . |
void |
serialize(T value,
com.fasterxml.jackson.core.JsonGenerator jsonGenerator,
com.fasterxml.jackson.databind.SerializerProvider serializerProvider) |
_neitherNull, _nonEmpty, acceptJsonFormatVisitor, createSchemaNode, createSchemaNode, findAnnotatedContentSerializer, findContextualConvertingSerializer, findConvertingContentSerializer, findFormatFeature, findFormatOverrides, findIncludeOverrides, findPropertyFilter, getSchema, getSchema, handledType, isDefaultSerializer, visitArrayFormat, visitArrayFormat, visitFloatFormat, visitIntFormat, visitIntFormat, visitStringFormat, visitStringFormat, wrapAndThrow, wrapAndThrow
@Nonnull protected abstract AbstractTypeConverter<T,Calendar> getConverterInstance()
Calendar
.public void serialize(@Nullable T value, @Nonnull com.fasterxml.jackson.core.JsonGenerator jsonGenerator, @Nonnull com.fasterxml.jackson.databind.SerializerProvider serializerProvider) throws IOException
serialize
in class com.fasterxml.jackson.databind.ser.std.StdSerializer<T>
IOException
Copyright © 2020 SAP SE. All rights reserved.