Class JDKFromStringDeserializer

All Implemented Interfaces:
NullValueProvider, ValueInstantiator.Gettable

public class JDKFromStringDeserializer extends FromStringDeserializer<Object>
Base class for simple deserializers that serialize values from String representation: this includes JSON Strings and other Scalar values that can be coerced into text, like Numbers and Booleans). Simple JSON String values are trimmed using String.trim(). Partial deserializer implementation will try to first access current token as a String, calls _deserialize(String,DeserializationContext) and returns return value. If this does not work (current token not a simple scalar type), attempts are made so that:
  • Embedded values (JsonToken.VALUE_EMBEDDED_OBJECT) are returned as-is if they are of compatible type
  • Arrays may be "unwrapped" if (and only if) DeserializationFeature.UNWRAP_SINGLE_VALUE_ARRAYS is enabled, and array contains just a single scalar value that can be deserialized (for example, JSON Array with single JSON String element).

Special handling includes: