Class OffsetDateTimeDeserializer
java.lang.Object
cz.cvut.kbss.jsonld.deserialization.datetime.OffsetDateTimeDeserializer
- All Implemented Interfaces:
Configurable,ValueDeserializer<OffsetDateTime>
Deserializes values to
OffsetDateTime.
If the value is a number, it is taken as the number of milliseconds since the Unix Epoch. Otherwise, it is parsed as a string.
If a datetime pattern is configured (ConfigParam.DATE_TIME_FORMAT), it is used to parse
the value. Otherwise, the default ISO-based pattern is used.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(Configuration config) Applies the specified configuration to this deserializer.deserialize(jakarta.json.JsonValue jsonNode, DeserializationContext<OffsetDateTime> ctx) Deserializes the specified JSON-LD node.
-
Constructor Details
-
OffsetDateTimeDeserializer
public OffsetDateTimeDeserializer()
-
-
Method Details
-
deserialize
public OffsetDateTime deserialize(jakarta.json.JsonValue jsonNode, DeserializationContext<OffsetDateTime> ctx) Description copied from interface:ValueDeserializerDeserializes the specified JSON-LD node.- Specified by:
deserializein interfaceValueDeserializer<OffsetDateTime>- Parameters:
jsonNode- JSON-LD node to deserializectx- Deserialization context- Returns:
- Deserialized object
-
configure
Description copied from interface:ValueDeserializerApplies the specified configuration to this deserializer.Should be called at the beginning of deserialization of JSON-LD content so that potential runtime changes in configuration can be reflected by the deserialization process.
Implementations are free to apply configuration on initialization and rely on the default implementation of this method which does nothing.
- Specified by:
configurein interfaceConfigurable- Specified by:
configurein interfaceValueDeserializer<OffsetDateTime>- Parameters:
config- Configuration to apply
-