Class ZonedDateTimeSerializer
java.lang.Object
com.fasterxml.jackson.databind.JsonSerializer<ZonedDateTime>
com.fasterxml.jackson.databind.ser.std.StdSerializer<ZonedDateTime>
com.fasterxml.jackson.datatype.jsr310.ser.JSR310SerializerBase<ZonedDateTime>
com.fasterxml.jackson.datatype.jsr310.ser.JSR310FormattedSerializerBase<ZonedDateTime>
com.fasterxml.jackson.datatype.jsr310.ser.InstantSerializerBase<ZonedDateTime>
com.fasterxml.jackson.datatype.jsr310.ser.ZonedDateTimeSerializer
- All Implemented Interfaces:
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable
,com.fasterxml.jackson.databind.jsonschema.SchemaAware
,com.fasterxml.jackson.databind.ser.ContextualSerializer
,Serializable
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer
com.fasterxml.jackson.databind.JsonSerializer.None
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Boolean
Flag forJsonFormat.Feature.WRITE_DATES_WITH_ZONE_ID
static final ZonedDateTimeSerializer
private static final long
Fields inherited from class com.fasterxml.jackson.datatype.jsr310.ser.JSR310FormattedSerializerBase
_formatter, _integerListType, _shape, _useNanoseconds, _useTimestamp
Fields inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer
_handledType
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
protected
ZonedDateTimeSerializer
(ZonedDateTimeSerializer base, Boolean useTimestamp, Boolean useNanoseconds, DateTimeFormatter formatter, com.fasterxml.jackson.annotation.JsonFormat.Shape shape, Boolean writeZoneId) protected
ZonedDateTimeSerializer
(ZonedDateTimeSerializer base, Boolean useTimestamp, Boolean useNanoseconds, DateTimeFormatter formatter, Boolean writeZoneId) Deprecated.protected
ZonedDateTimeSerializer
(ZonedDateTimeSerializer base, Boolean useTimestamp, DateTimeFormatter formatter, Boolean writeZoneId) ZonedDateTimeSerializer
(DateTimeFormatter formatter) -
Method Summary
Modifier and TypeMethodDescriptionprotected com.fasterxml.jackson.core.JsonToken
serializationShape
(com.fasterxml.jackson.databind.SerializerProvider provider) Overridable helper method used fromJSR310SerializerBase.serializeWithType(T, com.fasterxml.jackson.core.JsonGenerator, com.fasterxml.jackson.databind.SerializerProvider, com.fasterxml.jackson.databind.jsontype.TypeSerializer)
, to indicate shape of value during serialization; needed to know how type id is to be serialized.void
serialize
(ZonedDateTime value, com.fasterxml.jackson.core.JsonGenerator g, com.fasterxml.jackson.databind.SerializerProvider provider) boolean
shouldWriteWithZoneId
(com.fasterxml.jackson.databind.SerializerProvider ctxt) protected JSR310FormattedSerializerBase
<?> withFeatures
(Boolean writeZoneId) Deprecated.protected JSR310FormattedSerializerBase
<?> withFeatures
(Boolean writeZoneId, Boolean writeNanoseconds) protected JSR310FormattedSerializerBase
<?> withFormat
(Boolean useTimestamp, DateTimeFormatter formatter, com.fasterxml.jackson.annotation.JsonFormat.Shape shape) Methods inherited from class com.fasterxml.jackson.datatype.jsr310.ser.InstantSerializerBase
_acceptTimestampVisitor, formatValue
Methods inherited from class com.fasterxml.jackson.datatype.jsr310.ser.JSR310FormattedSerializerBase
_integerListType, _useDateTimeFormatter, _useTimestampExplicitOnly, acceptJsonFormatVisitor, createContextual, getSchema, getTimestampsFeature, useNanoseconds, useTimestamp
Methods inherited from class com.fasterxml.jackson.datatype.jsr310.ser.JSR310SerializerBase
serializeWithType
Methods inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer
_neitherNull, _nonEmpty, createSchemaNode, createSchemaNode, findAnnotatedContentSerializer, findContextualConvertingSerializer, findConvertingContentSerializer, findFormatFeature, findFormatOverrides, findIncludeOverrides, findPropertyFilter, getSchema, handledType, isDefaultSerializer, visitArrayFormat, visitArrayFormat, visitFloatFormat, visitIntFormat, visitIntFormat, visitStringFormat, visitStringFormat, wrapAndThrow, wrapAndThrow
Methods inherited from class com.fasterxml.jackson.databind.JsonSerializer
getDelegatee, isEmpty, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, unwrappingSerializer, usesObjectId, withFilterId, withIgnoredProperties
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
INSTANCE
-
_writeZoneId
Flag forJsonFormat.Feature.WRITE_DATES_WITH_ZONE_ID
- Since:
- 2.8
-
-
Constructor Details
-
ZonedDateTimeSerializer
protected ZonedDateTimeSerializer() -
ZonedDateTimeSerializer
-
ZonedDateTimeSerializer
protected ZonedDateTimeSerializer(ZonedDateTimeSerializer base, Boolean useTimestamp, DateTimeFormatter formatter, Boolean writeZoneId) -
ZonedDateTimeSerializer
@Deprecated protected ZonedDateTimeSerializer(ZonedDateTimeSerializer base, Boolean useTimestamp, Boolean useNanoseconds, DateTimeFormatter formatter, Boolean writeZoneId) Deprecated. -
ZonedDateTimeSerializer
protected ZonedDateTimeSerializer(ZonedDateTimeSerializer base, Boolean useTimestamp, Boolean useNanoseconds, DateTimeFormatter formatter, com.fasterxml.jackson.annotation.JsonFormat.Shape shape, Boolean writeZoneId) - Since:
- 2.14
-
-
Method Details
-
withFormat
protected JSR310FormattedSerializerBase<?> withFormat(Boolean useTimestamp, DateTimeFormatter formatter, com.fasterxml.jackson.annotation.JsonFormat.Shape shape) - Specified by:
withFormat
in classInstantSerializerBase<ZonedDateTime>
-
withFeatures
Deprecated.- Overrides:
withFeatures
in classJSR310FormattedSerializerBase<ZonedDateTime>
-
withFeatures
protected JSR310FormattedSerializerBase<?> withFeatures(Boolean writeZoneId, Boolean writeNanoseconds) - Overrides:
withFeatures
in classJSR310FormattedSerializerBase<ZonedDateTime>
-
serialize
public void serialize(ZonedDateTime value, com.fasterxml.jackson.core.JsonGenerator g, com.fasterxml.jackson.databind.SerializerProvider provider) throws IOException - Overrides:
serialize
in classInstantSerializerBase<ZonedDateTime>
- Throws:
IOException
-
shouldWriteWithZoneId
public boolean shouldWriteWithZoneId(com.fasterxml.jackson.databind.SerializerProvider ctxt) - Since:
- 2.8
-
serializationShape
protected com.fasterxml.jackson.core.JsonToken serializationShape(com.fasterxml.jackson.databind.SerializerProvider provider) Description copied from class:JSR310SerializerBase
Overridable helper method used fromJSR310SerializerBase.serializeWithType(T, com.fasterxml.jackson.core.JsonGenerator, com.fasterxml.jackson.databind.SerializerProvider, com.fasterxml.jackson.databind.jsontype.TypeSerializer)
, to indicate shape of value during serialization; needed to know how type id is to be serialized.- Overrides:
serializationShape
in classInstantSerializerBase<ZonedDateTime>
-