com.fasterxml.jackson.databind.deser.std

## Class StdScalarDeserializer<T>

- 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>

- All Implemented Interfaces:
    NullValueProvider, Serializable
  Direct Known Subclasses:
    AtomicBooleanDeserializer, ByteBufferDeserializer, DateDeserializers.DateBasedDeserializer, EnumDeserializer, FromStringDeserializer, NioPathDeserializer, NumberDeserializers.BigDecimalDeserializer, NumberDeserializers.BigIntegerDeserializer, NumberDeserializers.NumberDeserializer, NumberDeserializers.PrimitiveOrWrapperDeserializer, StackTraceElementDeserializer, StringDeserializer, TokenBufferDeserializer

      public abstract class StdScalarDeserializer<T>
      extends StdDeserializer<T>

  Base class for deserializers that handle types that are serialized as JSON scalars (non-structured, i.e. non-Object, non-Array, values).
  See Also:
    Serialized Form

- - ### Nested Class Summary

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

      `JsonDeserializer.None`

  - ### Field Summary

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

      `_valueClass, F_MASK_ACCEPT_ARRAYS, F_MASK_INT_COERCIONS`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `StdScalarDeserializer(Class<?> vc)`
    `protected` | `StdScalarDeserializer(JavaType valueType)`
    `protected` | `StdScalarDeserializer(StdScalarDeserializer<?> src)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `T` | `deserialize(JsonParser p, DeserializationContext ctxt, T intoValue)` Overridden to simply call `deserialize()` method that does not take value to update, since scalar values are usually non-mergeable.
    `Object` | `deserializeWithType(JsonParser p, DeserializationContext ctxt, TypeDeserializer typeDeserializer)` Base implementation that does not assume specific type inclusion mechanism.
    `AccessPattern` | `getEmptyAccessPattern()` This method may be called in conjunction with calls to `JsonDeserializer.getEmptyValue(DeserializationContext)`, to check whether it needs to be called just once (static values), or each time empty value is needed.
    `AccessPattern` | `getNullAccessPattern()` Default implementation indicates that "null value" to use for input null is simply Java `null` for all deserializers, unless overridden by sub-classes.
    `Boolean` | `supportsUpdate(DeserializationConfig config)` By default assumption is that scalar types cannot be updated: many are immutable values (such as primitives and wrappers)

    - ### 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.JsonDeserializer

      `deserialize, 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`

- - ### Constructor Detail

    - #### StdScalarDeserializer

          protected StdScalarDeserializer(Class<?> vc)

    - #### StdScalarDeserializer

          protected StdScalarDeserializer(JavaType valueType)

    - #### StdScalarDeserializer

          protected StdScalarDeserializer(StdScalarDeserializer<?> src)

  - ### Method Detail

    - #### deserializeWithType

          public Object deserializeWithType(JsonParser p,
                                            DeserializationContext ctxt,
                                            TypeDeserializer typeDeserializer)
                                     throws IOException

      Description copied from class: `StdDeserializer`
      Base implementation that does not assume specific type inclusion mechanism. Sub-classes are expected to override this method if they are to handle type information.
      Overrides:
        `deserializeWithType` in class `StdDeserializer<T>`
        `typeDeserializer` - Deserializer to use for handling type information
      Throws:
        `IOException`

    - #### deserialize

          public T deserialize(JsonParser p,
                               DeserializationContext ctxt,
                               T intoValue)
                        throws IOException

      Overridden to simply call `deserialize()` method that does not take value to update, since scalar values are usually non-mergeable.
      Overrides:
        `deserialize` in class `JsonDeserializer<T>`
      Throws:
        `IOException`

    - #### supportsUpdate

          public Boolean supportsUpdate(DeserializationConfig config)

      By default assumption is that scalar types cannot be updated: many are immutable values (such as primitives and wrappers)
      Overrides:
        `supportsUpdate` in class `JsonDeserializer<T>`

    - #### getNullAccessPattern

          public AccessPattern getNullAccessPattern()

      Description copied from class: `JsonDeserializer`
      Default implementation indicates that "null value" to use for input null is simply Java `null` for all deserializers, unless overridden by sub-classes. This information may be used as optimization.
      Specified by:
        `getNullAccessPattern` in interface `NullValueProvider`
      Overrides:
        `getNullAccessPattern` in class `JsonDeserializer<T>`

    - #### getEmptyAccessPattern

          public AccessPattern getEmptyAccessPattern()

      Description copied from class: `JsonDeserializer`
      This method may be called in conjunction with calls to `JsonDeserializer.getEmptyValue(DeserializationContext)`, to check whether it needs to be called just once (static values), or each time empty value is needed.
      Overrides:
        `getEmptyAccessPattern` in class `JsonDeserializer<T>`

Copyright © 2008–2018 FasterXML. All rights reserved.