Class LocalDateSerializer

  • 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 LocalDateSerializer
    extends JSR310FormattedSerializerBase<java.time.LocalDate>
    Serializer for Java 8 temporal LocalDates.
    Since:
    2.2
    See Also:
    Serialized Form
    • Constructor Detail

      • LocalDateSerializer

        protected LocalDateSerializer()
      • LocalDateSerializer

        protected LocalDateSerializer​(LocalDateSerializer base,
                                      java.lang.Boolean useTimestamp,
                                      java.time.format.DateTimeFormatter dtf,
                                      com.fasterxml.jackson.annotation.JsonFormat.Shape shape)
      • LocalDateSerializer

        public LocalDateSerializer​(java.time.format.DateTimeFormatter formatter)
    • Method Detail

      • serialize

        public void serialize​(java.time.LocalDate date,
                              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.LocalDate>
        Throws:
        java.io.IOException
      • serializeWithType

        public void serializeWithType​(java.time.LocalDate 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.LocalDate>
        Throws:
        java.io.IOException
      • _serializeAsArrayContents

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

        public void acceptJsonFormatVisitor​(com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper visitor,
                                            com.fasterxml.jackson.databind.JavaType typeHint)
                                     throws com.fasterxml.jackson.databind.JsonMappingException
        Specified by:
        acceptJsonFormatVisitor in interface com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable
        Overrides:
        acceptJsonFormatVisitor in class JSR310FormattedSerializerBase<java.time.LocalDate>
        Throws:
        com.fasterxml.jackson.databind.JsonMappingException