Class ZonedDateTimeSerializer
java.lang.Object
tools.jackson.databind.ValueSerializer<ZonedDateTime>
tools.jackson.databind.ser.std.StdSerializer<ZonedDateTime>
tools.jackson.databind.ext.javatime.ser.JSR310SerializerBase<ZonedDateTime>
tools.jackson.databind.ext.javatime.ser.JSR310FormattedSerializerBase<ZonedDateTime>
tools.jackson.databind.ext.javatime.ser.InstantSerializerBase<ZonedDateTime>
tools.jackson.databind.ext.javatime.ser.ZonedDateTimeSerializer
- All Implemented Interfaces:
JsonFormatVisitable
-
Nested Class Summary
Nested classes/interfaces inherited from class ValueSerializer
ValueSerializer.None -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final BooleanFlag forJsonFormat.Feature.WRITE_DATES_WITH_ZONE_IDstatic final ZonedDateTimeSerializerFields inherited from class JSR310FormattedSerializerBase
_formatter, _integerListType, _shape, _useNanoseconds, _useTimestampFields inherited from class StdSerializer
_handledType -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedZonedDateTimeSerializer(DateTimeFormatter formatter) protectedZonedDateTimeSerializer(ZonedDateTimeSerializer base, DateTimeFormatter formatter, Boolean useTimestamp, Boolean useNanoseconds, Boolean writeZoneId, com.fasterxml.jackson.annotation.JsonFormat.Shape shape) -
Method Summary
Modifier and TypeMethodDescriptionprotected StringformatValue(ZonedDateTime value, SerializationContext ctxt) protected tools.jackson.core.JsonTokenOverridable helper method used fromJSR310SerializerBase.serializeWithType(T, JsonGenerator, SerializationContext, TypeSerializer), to indicate shape of value during serialization; needed to know how type id is to be serialized.voidserialize(ZonedDateTime value, tools.jackson.core.JsonGenerator g, SerializationContext ctxt) Method that can be called to ask implementation to serialize values of type this serializer handles.booleanprotected JSR310FormattedSerializerBase<?> withFeatures(Boolean writeZoneId, Boolean useNanoseconds) protected JSR310FormattedSerializerBase<?> withFormat(DateTimeFormatter formatter, Boolean useTimestamp, com.fasterxml.jackson.annotation.JsonFormat.Shape shape) Methods inherited from class InstantSerializerBase
_acceptTimestampVisitor, _truncateToMillisMethods inherited from class JSR310FormattedSerializerBase
_integerListType, _useDateTimeFormatter, _useTimestampExplicitOnly, acceptJsonFormatVisitor, createContextual, getTimestampsFeature, useNanoseconds, useTimestamp, useTimestampFromGlobalDefaultsMethods inherited from class JSR310SerializerBase
serializeWithTypeMethods inherited from class StdSerializer
_neitherNull, _nonEmpty, _wrapIOFailure, acceptJsonFormatVisitorForBinary, createSchemaNode, createSchemaNode, findAnnotatedContentSerializer, findContextualConvertingSerializer, findFormatFeature, findFormatOverrides, findIncludeOverrides, findPropertyFilter, handledType, isDefaultSerializer, visitArrayFormat, visitArrayFormat, visitFloatFormat, visitIntFormat, visitIntFormat, visitStringFormat, visitStringFormat, wrapAndThrow, wrapAndThrowMethods inherited from class ValueSerializer
getDelegatee, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, resolve, unwrappingSerializer, usesObjectId, withFilterId, withFormatOverrides, withIgnoredProperties
-
Field Details
-
INSTANCE
-
_writeZoneId
Flag forJsonFormat.Feature.WRITE_DATES_WITH_ZONE_ID
-
-
Constructor Details
-
ZonedDateTimeSerializer
protected ZonedDateTimeSerializer() -
ZonedDateTimeSerializer
-
ZonedDateTimeSerializer
protected ZonedDateTimeSerializer(ZonedDateTimeSerializer base, DateTimeFormatter formatter, Boolean useTimestamp, Boolean useNanoseconds, Boolean writeZoneId, com.fasterxml.jackson.annotation.JsonFormat.Shape shape)
-
-
Method Details
-
withFormat
protected JSR310FormattedSerializerBase<?> withFormat(DateTimeFormatter formatter, Boolean useTimestamp, com.fasterxml.jackson.annotation.JsonFormat.Shape shape) - Specified by:
withFormatin classInstantSerializerBase<ZonedDateTime>
-
withFeatures
protected JSR310FormattedSerializerBase<?> withFeatures(Boolean writeZoneId, Boolean useNanoseconds) - Overrides:
withFeaturesin classJSR310FormattedSerializerBase<ZonedDateTime>
-
serialize
public void serialize(ZonedDateTime value, tools.jackson.core.JsonGenerator g, SerializationContext ctxt) throws tools.jackson.core.JacksonException Description copied from class:ValueSerializerMethod that can be called to ask implementation to serialize values of type this serializer handles.- Overrides:
serializein classInstantSerializerBase<ZonedDateTime>- Parameters:
value- Value to serialize; can not be null.g- Generator used to output resulting Json contentctxt- Context that can be used to get serializers for serializing Objects value contains, if any.- Throws:
tools.jackson.core.JacksonException
-
formatValue
- Overrides:
formatValuein classInstantSerializerBase<ZonedDateTime>
-
shouldWriteWithZoneId
-
serializationShape
Description copied from class:JSR310SerializerBaseOverridable helper method used fromJSR310SerializerBase.serializeWithType(T, JsonGenerator, SerializationContext, TypeSerializer), to indicate shape of value during serialization; needed to know how type id is to be serialized.- Overrides:
serializationShapein classInstantSerializerBase<ZonedDateTime>
-