Top Description Fields Constructors Methods
tools.jackson.jr.extension.javatime

public Class DefaultDateTimeValueReader<T extends TemporalAccessor>

extends ValueReader
Class Inheritance
Known Direct Subclasses
tools.jackson.jr.extension.javatime.OffsetDateTimeValueReader, tools.jackson.jr.extension.javatime.ZonedDateTimeValueReader
Imports
java.io.IOException, java.time.OffsetDateTime, .ZonedDateTime, java.time.temporal.TemporalAccessor, .TemporalQuery, java.util.Objects, tools.jackson.core.JacksonException, .JsonParser, .JsonToken, tools.jackson.jr.ob.JSONObjectException, tools.jackson.jr.ob.api.ValueReader, tools.jackson.jr.ob.impl.JSONReader

ValueReader designed to easily handle TemporalAccessor descendants such as OffsetDateTime and ZonedDateTime. Their string representation is expected to be in ISO 8601 format.
Since
2.20
See Also
ISO 8601 on Wikipedia

Field Summary

Modifier and TypeField and Description
private final TemporalQuery<T>
Inherited from tools.jackson.jr.ob.api.ValueReader:
_valueType

Constructor Summary

AccessConstructor and Description
public
DefaultDateTimeValueReader(Class<T>
Target type
targetType
,
TemporalQuery<T>
Temporal query for parsing
query
)

Constructor that includes a temporal query that is to be used during formatting.

Method Summary

Modifier and TypeMethod and Description
protected boolean

Returns:

Return true when an offset is missing, otherwise: false
offsetMissing
(String
ISO 8601 string
text
)

Check if an ISO 8601 string contains a time offset or not.

public Object
Inherited from tools.jackson.jr.ob.api.ValueReader:
_tokenDesc_tokenDesc_valueTypeDescreadNextvalueType

Field Detail

_queryback to summary
private final TemporalQuery<T> _query

Constructor Detail

DefaultDateTimeValueReaderback to summary
public DefaultDateTimeValueReader(Class<T> targetType, TemporalQuery<T> query)

Constructor that includes a temporal query that is to be used during formatting.

Parameters
targetType:Class<T>

Target type

query:TemporalQuery<T>

Temporal query for parsing

Method Detail

offsetMissingback to summary
protected boolean offsetMissing(String text)

Check if an ISO 8601 string contains a time offset or not.

Parameters
text:String

ISO 8601 string

Returns:boolean

Return true when an offset is missing, otherwise: false

readback to summary
public Object read(JSONReader reader, JsonParser p) throws JacksonException

Implements abstract tools.jackson.jr.ob.api.ValueReader.read.

Annotations
@Override