public class DurationDeserializer
extends com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer<T>
Duration(Object)
constructor on a JSON string. By default the only supported string format is that used by AbstractDuration.toString(). (That format for a 3,248 millisecond duration is "PT3.248S".)| Modifier and Type | Field and Description |
|---|---|
protected JacksonJodaPeriodFormat |
_format |
| Constructor and Description |
|---|
DurationDeserializer() |
DurationDeserializer(JacksonJodaPeriodFormat format) |
| Modifier and Type | Method and Description |
|---|---|
protected T |
_fromEmptyString(com.fasterxml.jackson.core.JsonParser p,
com.fasterxml.jackson.databind.DeserializationContext ctxt,
String str)
Helper method for specific case of deserialization
from empty or blank String.
|
protected org.joda.time.Duration |
_fromString(com.fasterxml.jackson.core.JsonParser p,
com.fasterxml.jackson.databind.DeserializationContext ctxt,
String value) |
protected org.joda.time.Duration |
_fromTimestamp(com.fasterxml.jackson.databind.DeserializationContext ctxt,
long ts) |
T |
_handleNotNumberOrString(com.fasterxml.jackson.core.JsonParser p,
com.fasterxml.jackson.databind.DeserializationContext ctxt) |
T |
_handleNotString(com.fasterxml.jackson.core.JsonParser p,
com.fasterxml.jackson.databind.DeserializationContext ctxt) |
protected boolean |
_isValidTimestampString(String str) |
org.joda.time.Duration |
deserialize(com.fasterxml.jackson.core.JsonParser p,
com.fasterxml.jackson.databind.DeserializationContext ctxt) |
Object |
deserializeWithType(com.fasterxml.jackson.core.JsonParser p,
com.fasterxml.jackson.databind.DeserializationContext ctxt,
com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeserializer) |
com.fasterxml.jackson.databind.type.LogicalType |
logicalType() |
deserialize, getEmptyAccessPattern, getNullAccessPattern, supportsUpdate_byteOverflow, _checkBooleanToStringCoercion, _checkCoercionFail, _checkDoubleSpecialValue, _checkFloatSpecialValue, _checkFloatToIntCoercion, _checkFloatToStringCoercion, _checkFromStringCoercion, _checkFromStringCoercion, _checkIntToFloatCoercion, _checkIntToStringCoercion, _checkTextualNull, _checkToStringCoercion, _coerceBooleanFromInt, _coercedTypeDesc, _coercedTypeDesc, _coerceEmptyString, _coerceIntegral, _coerceNullToken, _coerceTextualNull, _deserializeFromArray, _deserializeFromEmpty, _deserializeFromEmptyString, _deserializeFromString, _deserializeWrappedValue, _failDoubleToIntCoercion, _findCoercionFromBlankString, _findCoercionFromEmptyArray, _findCoercionFromEmptyString, _findNullProvider, _hasTextualNull, _intOverflow, _isBlank, _isEmptyOrTextualNull, _isFalse, _isIntNumber, _isNaN, _isNegInf, _isPosInf, _isTrue, _neitherNull, _nonNullNumber, _parseBoolean, _parseBooleanFromInt, _parseBooleanPrimitive, _parseBooleanPrimitive, _parseBytePrimitive, _parseDate, _parseDate, _parseDateFromArray, _parseDouble, _parseDouble, _parseDoublePrimitive, _parseDoublePrimitive, _parseDoublePrimitive, _parseFloatPrimitive, _parseFloatPrimitive, _parseFloatPrimitive, _parseInteger, _parseInteger, _parseInteger, _parseIntPrimitive, _parseIntPrimitive, _parseIntPrimitive, _parseLong, _parseLong, _parseLong, _parseLongPrimitive, _parseLongPrimitive, _parseLongPrimitive, _parseShortPrimitive, _parseString, _parseString, _reportFailedNullCoerce, _shortOverflow, _streamReadConstraints, _verifyEndArrayForSingle, _verifyNullForPrimitive, _verifyNullForPrimitiveCoercion, _verifyNullForScalarCoercion, _verifyNumberForScalarCoercion, _verifyStringForScalarCoercion, findContentNullProvider, findContentNullStyle, findConvertingContentDeserializer, findDeserializer, findFormatFeature, findFormatOverrides, findValueNullProvider, getValueClass, getValueInstantiator, getValueType, getValueType, handledType, handleMissingEndArrayForSingle, handleNestedArrayForSingle, handleUnknownProperty, isDefaultDeserializer, isDefaultKeyDeserializerprotected final JacksonJodaPeriodFormat _format
public DurationDeserializer()
public DurationDeserializer(JacksonJodaPeriodFormat format)
public org.joda.time.Duration deserialize(com.fasterxml.jackson.core.JsonParser p,
com.fasterxml.jackson.databind.DeserializationContext ctxt)
throws IOException
deserialize in class com.fasterxml.jackson.databind.JsonDeserializer<org.joda.time.Duration>IOExceptionprotected org.joda.time.Duration _fromString(com.fasterxml.jackson.core.JsonParser p,
com.fasterxml.jackson.databind.DeserializationContext ctxt,
String value)
throws IOException
IOExceptionprotected org.joda.time.Duration _fromTimestamp(com.fasterxml.jackson.databind.DeserializationContext ctxt,
long ts)
public Object deserializeWithType(com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext ctxt, com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeserializer) throws IOException
deserializeWithType in class com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer<T>IOExceptionpublic com.fasterxml.jackson.databind.type.LogicalType logicalType()
logicalType in class com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer<T>protected boolean _isValidTimestampString(String str)
protected T _fromEmptyString(com.fasterxml.jackson.core.JsonParser p,
com.fasterxml.jackson.databind.DeserializationContext ctxt,
String str)
throws IOException
IOExceptionpublic T _handleNotNumberOrString(com.fasterxml.jackson.core.JsonParser p,
com.fasterxml.jackson.databind.DeserializationContext ctxt)
throws IOException
IOExceptionpublic T _handleNotString(com.fasterxml.jackson.core.JsonParser p,
com.fasterxml.jackson.databind.DeserializationContext ctxt)
throws IOException
IOExceptionCopyright © 2025 FasterXML. All rights reserved.