Class JsonObjectDeserializer<T>

java.lang.Object
com.fasterxml.jackson.databind.JsonDeserializer<T>
org.springframework.boot.jackson2.JsonObjectDeserializer<T>
Type Parameters:
T - the supported object type
All Implemented Interfaces:
com.fasterxml.jackson.databind.deser.NullValueProvider

@Deprecated(since="4.0.0", forRemoval=true) public abstract class JsonObjectDeserializer<T> extends com.fasterxml.jackson.databind.JsonDeserializer<T>
Deprecated, for removal: This API element is subject to removal in a future version.
since 4.0.0 for removal in 4.2.0 in favor of Jackson 3 and ObjectValueDeserializer
Helper base class for JsonDeserializer implementations that deserialize objects.
Since:
4.0.0
Author:
Phillip Webb
See Also:
  • Nested Class Summary

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

    com.fasterxml.jackson.databind.JsonDeserializer.None
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final T
    deserialize(com.fasterxml.jackson.core.JsonParser jp, com.fasterxml.jackson.databind.DeserializationContext ctxt)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected abstract T
    deserializeObject(com.fasterxml.jackson.core.JsonParser jsonParser, com.fasterxml.jackson.databind.DeserializationContext context, com.fasterxml.jackson.core.ObjectCodec codec, com.fasterxml.jackson.databind.JsonNode tree)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Deserialize JSON content into the value type this serializer handles.
    protected final com.fasterxml.jackson.databind.JsonNode
    getRequiredNode(com.fasterxml.jackson.databind.JsonNode tree, String fieldName)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Helper method to return a JsonNode from the tree.
    protected final <D> @Nullable D
    nullSafeValue(com.fasterxml.jackson.databind.JsonNode jsonNode, Class<D> type)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Helper method to extract a value from the given jsonNode or return null when the node itself is null.
    protected final <D,R> @Nullable R
    nullSafeValue(com.fasterxml.jackson.databind.JsonNode jsonNode, Class<D> type, Function<D,R> mapper)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Helper method to extract a value from the given jsonNode or return null when the node itself is null.

    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

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JsonObjectDeserializer

      public JsonObjectDeserializer()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • deserialize

      public final T deserialize(com.fasterxml.jackson.core.JsonParser jp, com.fasterxml.jackson.databind.DeserializationContext ctxt) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      deserialize in class com.fasterxml.jackson.databind.JsonDeserializer<T>
      Throws:
      IOException
    • deserializeObject

      protected abstract T deserializeObject(com.fasterxml.jackson.core.JsonParser jsonParser, com.fasterxml.jackson.databind.DeserializationContext context, com.fasterxml.jackson.core.ObjectCodec codec, com.fasterxml.jackson.databind.JsonNode tree) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Deserialize JSON content into the value type this serializer handles.
      Parameters:
      jsonParser - the source parser used for reading JSON content
      context - context that can be used to access information about this deserialization activity
      codec - the ObjectCodec associated with the parser
      tree - deserialized JSON content as tree expressed using set of TreeNode instances
      Returns:
      the deserialized object
      Throws:
      IOException - on error
      See Also:
    • nullSafeValue

      protected final <D,R> @Nullable R nullSafeValue(com.fasterxml.jackson.databind.JsonNode jsonNode, Class<D> type, Function<D,R> mapper)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Helper method to extract a value from the given jsonNode or return null when the node itself is null.
      Type Parameters:
      D - the data type requested
      R - the result type
      Parameters:
      jsonNode - the source node (may be null)
      type - the data type. May be String, Boolean, Long, Integer, Short, Double, Float, BigDecimal or BigInteger.
      mapper - a mapper to convert the value when it is not null
      Returns:
      the node value or null
    • nullSafeValue

      protected final <D> @Nullable D nullSafeValue(com.fasterxml.jackson.databind.JsonNode jsonNode, Class<D> type)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Helper method to extract a value from the given jsonNode or return null when the node itself is null.
      Type Parameters:
      D - the data type requested
      Parameters:
      jsonNode - the source node (may be null)
      type - the data type. May be String, Boolean, Long, Integer, Short, Double, Float, BigDecimal or BigInteger.
      Returns:
      the node value or null
    • getRequiredNode

      protected final com.fasterxml.jackson.databind.JsonNode getRequiredNode(com.fasterxml.jackson.databind.JsonNode tree, String fieldName)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Helper method to return a JsonNode from the tree.
      Parameters:
      tree - the source tree
      fieldName - the field name to extract
      Returns:
      the JsonNode