Top Fields Constructors Methods
tools.jackson.databind.ext.javatime.ser

public Class ZonedDateTimeSerializer

extends InstantSerializerBase<ZonedDateTime>
Class Inheritance
Imports
java.time.ZonedDateTime, java.time.format.DateTimeFormatter, com.fasterxml.jackson.annotation.JsonFormat, tools.jackson.core.JacksonException, .JsonGenerator, .JsonToken, tools.jackson.databind.SerializationContext, tools.jackson.databind.cfg.DateTimeFeature

Field Summary

Modifier and TypeField and Description
protected final Boolean
_writeZoneId

Flag for JsonFormat.Feature.WRITE_DATES_WITH_ZONE_ID

public static final ZonedDateTimeSerializer

Constructor Summary

AccessConstructor and Description
protected
public
protected
ZonedDateTimeSerializer(ZonedDateTimeSerializer base, DateTimeFormatter formatter, Boolean useTimestamp, Boolean useNanoseconds, Boolean writeZoneId, JsonFormat.Shape shape)

Method Summary

Modifier and TypeMethod and Description
protected String
protected JsonToken
serializationShape(SerializationContext ctxt)

Overrides tools.jackson.databind.ext.javatime.ser.InstantSerializerBase.serializationShape.

Overridable helper method used from serializeWithType, to indicate shape of value during serialization; needed to know how type id is to be serialized.

public void
serialize(ZonedDateTime value, JsonGenerator g, SerializationContext ctxt)

Overrides tools.jackson.databind.ext.javatime.ser.InstantSerializerBase.serialize.

Method that can be called to ask implementation to serialize values of type this serializer handles.

public boolean
protected JSR310FormattedSerializerBase<?>
protected JSR310FormattedSerializerBase<?>
Inherited from tools.jackson.databind.ext.javatime.ser.InstantSerializerBase:
_acceptTimestampVisitor

Field Detail

_writeZoneIdback to summary
protected final Boolean _writeZoneId

Flag for JsonFormat.Feature.WRITE_DATES_WITH_ZONE_ID

INSTANCEback to summary
public static final ZonedDateTimeSerializer INSTANCE

Constructor Detail

ZonedDateTimeSerializerback to summary
protected ZonedDateTimeSerializer()
ZonedDateTimeSerializerback to summary
public ZonedDateTimeSerializer(DateTimeFormatter formatter)
ZonedDateTimeSerializerback to summary
protected ZonedDateTimeSerializer(ZonedDateTimeSerializer base, DateTimeFormatter formatter, Boolean useTimestamp, Boolean useNanoseconds, Boolean writeZoneId, JsonFormat.Shape shape)

Method Detail

formatValueback to summary
protected String formatValue(ZonedDateTime value, SerializationContext ctxt)

Overrides tools.jackson.databind.ext.javatime.ser.InstantSerializerBase.formatValue.

Annotations
@Override
serializationShapeback to summary
protected JsonToken serializationShape(SerializationContext ctxt)

Overrides tools.jackson.databind.ext.javatime.ser.InstantSerializerBase.serializationShape.

Doc from tools.jackson.databind.ext.javatime.ser.JSR310SerializerBase.serializationShape.

Overridable helper method used from serializeWithType, to indicate shape of value during serialization; needed to know how type id is to be serialized.

Annotations
@Override
serializeback to summary
public void serialize(ZonedDateTime value, JsonGenerator g, SerializationContext ctxt) throws JacksonException

Overrides tools.jackson.databind.ext.javatime.ser.InstantSerializerBase.serialize.

Doc from tools.jackson.databind.ValueSerializer.serialize.

Method that can be called to ask implementation to serialize values of type this serializer handles.

Annotations
@Override
shouldWriteWithZoneIdback to summary
public boolean shouldWriteWithZoneId(SerializationContext ctxt)
withFeaturesback to summary
protected JSR310FormattedSerializerBase<?> withFeatures(Boolean writeZoneId, Boolean useNanoseconds)

Overrides tools.jackson.databind.ext.javatime.ser.JSR310FormattedSerializerBase.withFeatures.

Annotations
@Override
withFormatback to summary
protected JSR310FormattedSerializerBase<?> withFormat(DateTimeFormatter formatter, Boolean useTimestamp, JsonFormat.Shape shape)

Implements abstract tools.jackson.databind.ext.javatime.ser.InstantSerializerBase.withFormat.

Annotations
@Override