Module org.eclipse.yasson
Class LocalTimeTypeDeserializer
- java.lang.Object
-
- org.eclipse.yasson.internal.serializer.AbstractValueTypeDeserializer<T>
-
- org.eclipse.yasson.internal.serializer.AbstractDateTimeDeserializer<LocalTime>
-
- org.eclipse.yasson.internal.serializer.LocalTimeTypeDeserializer
-
- All Implemented Interfaces:
jakarta.json.bind.serializer.JsonbDeserializer<LocalTime>
public class LocalTimeTypeDeserializer extends AbstractDateTimeDeserializer<LocalTime>
Deserializer forLocalTimetype.
-
-
Field Summary
-
Fields inherited from class org.eclipse.yasson.internal.serializer.AbstractDateTimeDeserializer
UTC
-
-
Constructor Summary
Constructors Constructor Description LocalTimeTypeDeserializer(Customization customization)Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected LocalTimefromInstant(Instant instant)Construct date object from an instant containing epoch millisecond.protected LocalTimeparseDefault(String jsonValue, Locale locale)Parse java.time date object with default formatter.protected LocalTimeparseWithFormatter(String jsonValue, DateTimeFormatter formatter)Parse java.time date object with provided formatter.-
Methods inherited from class org.eclipse.yasson.internal.serializer.AbstractDateTimeDeserializer
deserialize, getJsonbDateFormatter, getZonedFormatter
-
Methods inherited from class org.eclipse.yasson.internal.serializer.AbstractValueTypeDeserializer
deserialize, getCustomization, getPropertyType
-
-
-
-
Constructor Detail
-
LocalTimeTypeDeserializer
public LocalTimeTypeDeserializer(Customization customization)
Creates an instance.- Parameters:
customization- Model customization.
-
-
Method Detail
-
fromInstant
protected LocalTime fromInstant(Instant instant)
Description copied from class:AbstractDateTimeDeserializerConstruct date object from an instant containing epoch millisecond. If date object supports zone offset / zone id, system default is used and warning is logged.- Specified by:
fromInstantin classAbstractDateTimeDeserializer<LocalTime>- Parameters:
instant- instant to construct from- Returns:
- date object
-
parseDefault
protected LocalTime parseDefault(String jsonValue, Locale locale)
Description copied from class:AbstractDateTimeDeserializerParse java.time date object with default formatter. Different default formatter for each date object type is used.- Specified by:
parseDefaultin classAbstractDateTimeDeserializer<LocalTime>- Parameters:
jsonValue- string value to parse fromlocale- annotated locale or default- Returns:
- parsed date object
-
parseWithFormatter
protected LocalTime parseWithFormatter(String jsonValue, DateTimeFormatter formatter)
Description copied from class:AbstractDateTimeDeserializerParse java.time date object with provided formatter.- Specified by:
parseWithFormatterin classAbstractDateTimeDeserializer<LocalTime>- Parameters:
jsonValue- string value to parse fromformatter- a formatter to use- Returns:
- parsed date object
-
-