Class ObjectValueDeserializer<T>
java.lang.Object
tools.jackson.databind.ValueDeserializer<T>
org.springframework.boot.jackson.ObjectValueDeserializer<T>
- Type Parameters:
- T- the supported object type
- All Implemented Interfaces:
- tools.jackson.databind.deser.NullValueProvider
public abstract class ObjectValueDeserializer<T>
extends tools.jackson.databind.ValueDeserializer<T>
Helper base class for 
ValueDeserializer implementations that deserialize
objects.- Since:
- 4.0.0
- Author:
- Phillip Webb
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class tools.jackson.databind.ValueDeserializertools.jackson.databind.ValueDeserializer.None
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionfinal Tdeserialize(tools.jackson.core.JsonParser jp, tools.jackson.databind.DeserializationContext ctxt) protected abstract TdeserializeObject(tools.jackson.core.JsonParser jsonParser, tools.jackson.databind.DeserializationContext context, tools.jackson.databind.JsonNode tree) Deserialize JSON content into the value type this serializer handles.protected final tools.jackson.databind.JsonNodegetRequiredNode(tools.jackson.databind.JsonNode tree, String fieldName) Helper method to return aJsonNodefrom the tree.protected final <D> @Nullable DnullSafeValue(@Nullable tools.jackson.databind.JsonNode jsonNode, Class<D> type) Helper method to extract a value from the givenjsonNodeor returnnullwhen the node itself isnull.protected final <D,R> @Nullable R nullSafeValue(@Nullable tools.jackson.databind.JsonNode jsonNode, Class<D> type, Function<D, R> mapper) Helper method to extract a value from the givenjsonNodeor returnnullwhen the node itself isnull.Methods inherited from class tools.jackson.databind.ValueDeserializercreateContextual, deserialize, deserializeWithType, deserializeWithType, findBackReference, getAbsentValue, getDelegatee, getEmptyAccessPattern, getEmptyValue, getKnownPropertyNames, getNullAccessPattern, getNullValue, getObjectIdReader, handledType, isCachable, logicalType, replaceDelegatee, resolve, supportsUpdate, unwrappingDeserializer
- 
Constructor Details- 
ObjectValueDeserializerpublic ObjectValueDeserializer()
 
- 
- 
Method Details- 
deserialize
- 
deserializeObjectprotected abstract T deserializeObject(tools.jackson.core.JsonParser jsonParser, tools.jackson.databind.DeserializationContext context, tools.jackson.databind.JsonNode tree) 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
- tree- deserialized JSON content as tree expressed using set of- TreeNodeinstances
- Returns:
- the deserialized object
- See Also:
 
- 
nullSafeValueprotected final <D,R> @Nullable R nullSafeValue(@Nullable tools.jackson.databind.JsonNode jsonNode, Class<D> type, Function<D, R> mapper) Helper method to extract a value from the givenjsonNodeor returnnullwhen the node itself isnull.- 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,- BigDecimalor- BigInteger.
- mapper- a mapper to convert the value when it is not- null
- Returns:
- the node value or null
 
- 
nullSafeValueprotected final <D> @Nullable D nullSafeValue(@Nullable tools.jackson.databind.JsonNode jsonNode, Class<D> type) Helper method to extract a value from the givenjsonNodeor returnnullwhen the node itself isnull.- 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,- BigDecimalor- BigInteger.
- Returns:
- the node value or null
 
- 
getRequiredNodeprotected final tools.jackson.databind.JsonNode getRequiredNode(tools.jackson.databind.JsonNode tree, String fieldName) Helper method to return aJsonNodefrom the tree.- Parameters:
- tree- the source tree
- fieldName- the field name to extract
- Returns:
- the JsonNode
 
 
-