Class LocalDateSerializer
java.lang.Object
org.eclipse.yasson.internal.serializer.types.TypeSerializer<LocalDate>
org.eclipse.yasson.internal.serializer.types.AbstractDateSerializer<LocalDate>
org.eclipse.yasson.internal.serializer.types.LocalDateSerializer
- All Implemented Interfaces:
ModelSerializer
Serializer of the
LocalDate type.-
Field Summary
FieldsFields inherited from class AbstractDateSerializer
UTC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringformatDefault(LocalDate value, Locale locale) Format with default formatter for a given java.time date object.protected StringformatStrictIJson(LocalDate value) Format date object as strict IJson date format.protected InstantConvert java.time object to epoch milliseconds instant.Methods inherited from class AbstractDateSerializer
formatWithFormatter, getZonedFormatter, serializeKey, serializeValue, toTemporalAccessorMethods inherited from class TypeSerializer
serialize
-
Field Details
-
DEFAULT_FORMAT
-
-
Constructor Details
-
LocalDateSerializer
LocalDateSerializer(TypeSerializerBuilder serializerBuilder)
-
-
Method Details
-
toInstant
Description copied from class:AbstractDateSerializerConvert java.time object to epoch milliseconds instant. Discards zone offset and zone id information.- Specified by:
toInstantin classAbstractDateSerializer<LocalDate>- Parameters:
value- date object to convert- Returns:
- instant
-
formatDefault
Description copied from class:AbstractDateSerializerFormat with default formatter for a given java.time date object. Different default formatter for each date object type is used.- Specified by:
formatDefaultin classAbstractDateSerializer<LocalDate>- Parameters:
value- date objectlocale- locale from annotation / default not null- Returns:
- formatted date obj as string
-
formatStrictIJson
Description copied from class:AbstractDateSerializerFormat date object as strict IJson date format.- Overrides:
formatStrictIJsonin classAbstractDateSerializer<LocalDate>- Parameters:
value- value to format- Returns:
- formatted result
-