Class YearMonthSerializer

All Implemented Interfaces:
JsonFormatVisitable, SchemaAware, ContextualSerializer, Serializable

public class YearMonthSerializer extends StdSerializer<T>
Serializer for Java 8 temporal YearMonths.
Since:
2.2
Author:
Nick Williams
See Also:
  • Field Details

    • INSTANCE

      public static final YearMonthSerializer INSTANCE
    • _useTimestamp

      protected final Boolean _useTimestamp
      Flag that indicates that serialization must be done as the Java timestamp, regardless of other settings.
    • _useNanoseconds

      protected final Boolean _useNanoseconds
      Flag that indicates that numeric timestamp values must be written using nanosecond timestamps if the datatype supports such resolution, regardless of other settings.
    • _formatter

      protected final DateTimeFormatter _formatter
      Specific format to use, if not default format: non null value also indicates that serialization is to be done as JSON String, not numeric timestamp, unless #_useTimestamp is true.
    • _shape

      protected final JsonFormat.Shape _shape
    • _integerListType

      protected transient volatile JavaType _integerListType
      Lazily constructed JavaType representing type List<Integer>.
      Since:
      2.10
  • Constructor Details

    • YearMonthSerializer

      protected YearMonthSerializer()
    • YearMonthSerializer

      public YearMonthSerializer(DateTimeFormatter formatter)
  • Method Details