Class MonthDaySerializer

  • All Implemented Interfaces:
    com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable, com.fasterxml.jackson.databind.jsonschema.SchemaAware, com.fasterxml.jackson.databind.ser.ContextualSerializer, java.io.Serializable

    public class MonthDaySerializer
    extends JSR310FormattedSerializerBase<java.time.MonthDay>
    Serializer for Java 8 temporal MonthDays.

    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:
    Serialized Form
    • Constructor Detail

      • MonthDaySerializer

        protected MonthDaySerializer()
      • MonthDaySerializer

        public MonthDaySerializer​(java.time.format.DateTimeFormatter formatter)
      • MonthDaySerializer

        private MonthDaySerializer​(MonthDaySerializer base,
                                   java.lang.Boolean useTimestamp,
                                   java.time.format.DateTimeFormatter formatter)
    • Method Detail

      • serialize

        public void serialize​(java.time.MonthDay value,
                              com.fasterxml.jackson.core.JsonGenerator g,
                              com.fasterxml.jackson.databind.SerializerProvider provider)
                       throws java.io.IOException
        Specified by:
        serialize in class com.fasterxml.jackson.databind.ser.std.StdSerializer<java.time.MonthDay>
        Throws:
        java.io.IOException
      • serializeWithType

        public void serializeWithType​(java.time.MonthDay value,
                                      com.fasterxml.jackson.core.JsonGenerator g,
                                      com.fasterxml.jackson.databind.SerializerProvider provider,
                                      com.fasterxml.jackson.databind.jsontype.TypeSerializer typeSer)
                               throws java.io.IOException
        Overrides:
        serializeWithType in class JSR310SerializerBase<java.time.MonthDay>
        Throws:
        java.io.IOException
      • _serializeAsArrayContents

        protected void _serializeAsArrayContents​(java.time.MonthDay value,
                                                 com.fasterxml.jackson.core.JsonGenerator g,
                                                 com.fasterxml.jackson.databind.SerializerProvider provider)
                                          throws java.io.IOException
        Throws:
        java.io.IOException