Package com.fasterxml.jackson.datatype.joda.deser

## Class DurationDeserializer

- java.lang.Object
- - com.fasterxml.jackson.databind.JsonDeserializer<T>
  - - com.fasterxml.jackson.databind.deser.std.StdDeserializer<T>
    - - com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer<T>
      - - com.fasterxml.jackson.datatype.joda.deser.DurationDeserializer

All Implemented Interfaces:
  `Serializable`

    public class DurationDeserializer
    extends com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer<T>

Deserializes a Duration from either an int number of millis or using the `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".)

See Also:
  Serialized Form

### Nested Class Summary

### Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonDeserializer

`com.fasterxml.jackson.databind.JsonDeserializer.None`

### Field Summary

Fields
`protected JacksonJodaPeriodFormat` `_format`

### Fields inherited from class com.fasterxml.jackson.databind.deser.std.StdDeserializer

`_valueClass, F_MASK_ACCEPT_ARRAYS, F_MASK_INT_COERCIONS`

### Constructor Summary

Constructors
`DurationDeserializer​()`
`DurationDeserializer​(JacksonJodaPeriodFormat format)`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected org.joda.time.Duration` `_deserialize​(com.fasterxml.jackson.databind.DeserializationContext ctxt, String str)`
`T` `_handleNotNumberOrString​(com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext ctxt)`
`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)`

### Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer

`findBackReference, getDelegatee, getEmptyValue, getEmptyValue, getKnownPropertyNames, getNullValue, getNullValue, getObjectIdReader, isCachable, replaceDelegatee, unwrappingDeserializer`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from class com.fasterxml.jackson.databind.deser.std.StdDeserializer

`_byteOverflow, _coercedTypeDesc, _coerceEmptyString, _coerceIntegral, _coerceNullToken, _coerceTextualNull, _deserializeFromArray, _deserializeFromEmpty, _deserializeWrappedValue, _failDoubleToIntCoercion, _findNullProvider, _hasTextualNull, _intOverflow, _isEmptyOrTextualNull, _isIntNumber, _isNaN, _isNegInf, _isPosInf, _neitherNull, _nonNullNumber, _parseBooleanFromInt, _parseBooleanPrimitive, _parseBytePrimitive, _parseDate, _parseDate, _parseDateFromArray, _parseDoublePrimitive, _parseDoublePrimitive, _parseFloatPrimitive, _parseFloatPrimitive, _parseIntPrimitive, _parseIntPrimitive, _parseLongPrimitive, _parseLongPrimitive, _parseShortPrimitive, _parseString, _reportFailedNullCoerce, _shortOverflow, _verifyEndArrayForSingle, _verifyNullForPrimitive, _verifyNullForPrimitiveCoercion, _verifyNullForScalarCoercion, _verifyNumberForScalarCoercion, _verifyStringForScalarCoercion, findContentNullProvider, findContentNullStyle, findConvertingContentDeserializer, findDeserializer, findFormatFeature, findFormatOverrides, findValueNullProvider, getValueClass, getValueType, handledType, handleMissingEndArrayForSingle, handleUnknownProperty, isDefaultDeserializer, isDefaultKeyDeserializer, parseDouble`

### Methods inherited from class com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer

`deserialize, getEmptyAccessPattern, getNullAccessPattern, supportsUpdate`

### Field Detail

#### _format

    protected final JacksonJodaPeriodFormat _format

### Constructor Detail

#### DurationDeserializer

    public DurationDeserializer​()

#### DurationDeserializer

    public DurationDeserializer​(JacksonJodaPeriodFormat format)

### Method Detail

#### deserialize

    public org.joda.time.Duration deserialize​(com.fasterxml.jackson.core.JsonParser p,
                                              com.fasterxml.jackson.databind.DeserializationContext ctxt)
                                       throws IOException

Specified by:
  `deserialize` in class `com.fasterxml.jackson.databind.JsonDeserializer<org.joda.time.Duration>`
Throws:
  `IOException`

#### _deserialize

    protected org.joda.time.Duration _deserialize​(com.fasterxml.jackson.databind.DeserializationContext ctxt,
                                                  String str)
                                           throws IOException

Throws:
  `IOException`

#### deserializeWithType

    public Object deserializeWithType​(com.fasterxml.jackson.core.JsonParser p,
                                      com.fasterxml.jackson.databind.DeserializationContext ctxt,
                                      com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeserializer)
                               throws IOException

Overrides:
  `deserializeWithType` in class `com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer<T>`
Throws:
  `IOException`

#### _handleNotNumberOrString

    public T _handleNotNumberOrString​(com.fasterxml.jackson.core.JsonParser p,
                                      com.fasterxml.jackson.databind.DeserializationContext ctxt)
                               throws IOException

Throws:
  `IOException`