Class TableIndexColumnDefinitionDeserializer
java.lang.Object
com.fasterxml.jackson.databind.JsonDeserializer<TableIndexColumnDefinition>
com.datastax.astra.internal.serdes.tables.TableIndexColumnDefinitionDeserializer
- All Implemented Interfaces:
com.fasterxml.jackson.databind.deser.NullValueProvider
public class TableIndexColumnDefinitionDeserializer
extends com.fasterxml.jackson.databind.JsonDeserializer<TableIndexColumnDefinition>
A custom deserializer for converting JSON strings into
TableDuration objects.
Supports both ISO 8601 duration notation (e.g., "P1Y2M10DT2H30M") and compact notation (e.g., "1y2mo10d2h30m").
The deserializer attempts to parse the input string in the following order:
- ISO 8601 notation
- Compact notation
IOException is thrown.-
Nested Class Summary
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonDeserializer
com.fasterxml.jackson.databind.JsonDeserializer.None -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeserialize(com.fasterxml.jackson.core.JsonParser jp, com.fasterxml.jackson.databind.DeserializationContext ctxt) Deserializes a JSON string into aTableDurationobject.Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer
deserialize, deserializeWithType, deserializeWithType, findBackReference, getAbsentValue, getDelegatee, getEmptyAccessPattern, getEmptyValue, getEmptyValue, getKnownPropertyNames, getNullAccessPattern, getNullValue, getNullValue, getObjectIdReader, handledType, isCachable, logicalType, replaceDelegatee, supportsUpdate, unwrappingDeserializer
-
Constructor Details
-
TableIndexColumnDefinitionDeserializer
public TableIndexColumnDefinitionDeserializer()Default constructor.
-
-
Method Details
-
deserialize
public TableIndexColumnDefinition deserialize(com.fasterxml.jackson.core.JsonParser jp, com.fasterxml.jackson.databind.DeserializationContext ctxt) throws IOException Deserializes a JSON string into aTableDurationobject.- Specified by:
deserializein classcom.fasterxml.jackson.databind.JsonDeserializer<TableIndexColumnDefinition>- Parameters:
jp- theJsonParserproviding the JSON inputctxt- theDeserializationContextin which the deserializer is operating- Returns:
- a
TableDurationobject representing the parsed duration - Throws:
IOException- if the input string is not a valid duration format
-