Class MonthDaySerializer
java.lang.Object
com.fasterxml.jackson.databind.JsonSerializer<MonthDay>
com.fasterxml.jackson.databind.ser.std.StdSerializer<MonthDay>
com.fasterxml.jackson.datatype.jsr310.ser.JSR310SerializerBase<MonthDay>
com.fasterxml.jackson.datatype.jsr310.ser.JSR310FormattedSerializerBase<MonthDay>
com.fasterxml.jackson.datatype.jsr310.ser.MonthDaySerializer
- All Implemented Interfaces:
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable
,com.fasterxml.jackson.databind.jsonschema.SchemaAware
,com.fasterxml.jackson.databind.ser.ContextualSerializer
,Serializable
Serializer for Java 8 temporal
MonthDay
s.
NOTE: unlike many other date/time type serializers, this serializer will only
use Array notation if explicitly instructed to do so with JsonFormat
(either directly or through per-type defaults) and NOT with global defaults.
- Since:
- 2.7.1
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer
com.fasterxml.jackson.databind.JsonSerializer.None
-
Field Summary
FieldsFields 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
private
MonthDaySerializer
(MonthDaySerializer base, Boolean useTimestamp, DateTimeFormatter formatter) MonthDaySerializer
(DateTimeFormatter formatter) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
_serializeAsArrayContents
(MonthDay value, com.fasterxml.jackson.core.JsonGenerator g, com.fasterxml.jackson.databind.SerializerProvider provider) protected 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
(MonthDay value, com.fasterxml.jackson.core.JsonGenerator g, com.fasterxml.jackson.databind.SerializerProvider provider) void
serializeWithType
(MonthDay value, com.fasterxml.jackson.core.JsonGenerator g, com.fasterxml.jackson.databind.SerializerProvider provider, com.fasterxml.jackson.databind.jsontype.TypeSerializer typeSer) protected MonthDaySerializer
withFormat
(Boolean useTimestamp, DateTimeFormatter formatter, com.fasterxml.jackson.annotation.JsonFormat.Shape shape) Methods inherited from class com.fasterxml.jackson.datatype.jsr310.ser.JSR310FormattedSerializerBase
_acceptTimestampVisitor, _integerListType, _useDateTimeFormatter, _useTimestampExplicitOnly, acceptJsonFormatVisitor, createContextual, getSchema, getTimestampsFeature, useNanoseconds, useTimestamp, withFeatures, withFeatures
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
-
-
Constructor Details
-
MonthDaySerializer
protected MonthDaySerializer() -
MonthDaySerializer
-
MonthDaySerializer
private MonthDaySerializer(MonthDaySerializer base, Boolean useTimestamp, DateTimeFormatter formatter)
-
-
Method Details
-
withFormat
protected MonthDaySerializer withFormat(Boolean useTimestamp, DateTimeFormatter formatter, com.fasterxml.jackson.annotation.JsonFormat.Shape shape) - Specified by:
withFormat
in classJSR310FormattedSerializerBase<MonthDay>
-
serialize
public void serialize(MonthDay value, com.fasterxml.jackson.core.JsonGenerator g, com.fasterxml.jackson.databind.SerializerProvider provider) throws IOException - Specified by:
serialize
in classcom.fasterxml.jackson.databind.ser.std.StdSerializer<MonthDay>
- Throws:
IOException
-
serializeWithType
public void serializeWithType(MonthDay value, com.fasterxml.jackson.core.JsonGenerator g, com.fasterxml.jackson.databind.SerializerProvider provider, com.fasterxml.jackson.databind.jsontype.TypeSerializer typeSer) throws IOException - Overrides:
serializeWithType
in classJSR310SerializerBase<MonthDay>
- Throws:
IOException
-
_serializeAsArrayContents
protected void _serializeAsArrayContents(MonthDay value, com.fasterxml.jackson.core.JsonGenerator g, com.fasterxml.jackson.databind.SerializerProvider provider) throws IOException - Throws:
IOException
-
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.- Specified by:
serializationShape
in classJSR310SerializerBase<MonthDay>
-