Class ZonedDateTimeTypeDeserializer

  • All Implemented Interfaces:
    javax.json.bind.serializer.JsonbDeserializer<java.time.ZonedDateTime>

    public class ZonedDateTimeTypeDeserializer
    extends AbstractDateTimeDeserializer<java.time.ZonedDateTime>
    Deserializer for ZonedDateTime type.
    • Constructor Detail

      • ZonedDateTimeTypeDeserializer

        public ZonedDateTimeTypeDeserializer​(Customization customization)
        Creates an instance.
        Parameters:
        customization - Model customization.
    • Method Detail

      • fromInstant

        protected java.time.ZonedDateTime fromInstant​(java.time.Instant instant)
        fromInstant is called only in case JsonbDateFormat is TIME_IN_MILLIS, which doesn't make much sense for usage with ZonedDateTime.
        Specified by:
        fromInstant in class AbstractDateTimeDeserializer<java.time.ZonedDateTime>
        Parameters:
        instant - instant to construct from
        Returns:
        date object
      • parseDefault

        protected java.time.ZonedDateTime parseDefault​(java.lang.String jsonValue,
                                                       java.util.Locale locale)
        Description copied from class: AbstractDateTimeDeserializer
        Parse java.time date object with default formatter. Different default formatter for each date object type is used.
        Specified by:
        parseDefault in class AbstractDateTimeDeserializer<java.time.ZonedDateTime>
        Parameters:
        jsonValue - string value to parse from
        locale - annotated locale or default
        Returns:
        parsed date object
      • parseWithFormatter

        protected java.time.ZonedDateTime parseWithFormatter​(java.lang.String jsonValue,
                                                             java.time.format.DateTimeFormatter formatter)
        Description copied from class: AbstractDateTimeDeserializer
        Parse java.time date object with provided formatter.
        Specified by:
        parseWithFormatter in class AbstractDateTimeDeserializer<java.time.ZonedDateTime>
        Parameters:
        jsonValue - string value to parse from
        formatter - a formatter to use
        Returns:
        parsed date object