JsonNode deserializer implementations.
Uses iteration instead of recursion: this allows
handling of very deeply nested input structures.
This class should only be extended by internal Jackson deserializers. It is not intended to be used by custom deserializers.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | BaseNodeDeserializer.
Optimized variant similar in functionality to (a subset of)
|
| Modifier and Type | Field and Description |
|---|---|
| protected final boolean | |
| protected final boolean | |
| protected final Boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected abstract BaseNodeDeserializer | |
| protected final JsonNode | |
| protected final ContainerNode | _deserializeContainerNoRecursion(JsonParser p, DeserializationContext ctxt, JsonNodeFactory nodeFactory, BaseNodeDeserializer.
|
| protected final ObjectNode | _deserializeObjectAtName(JsonParser p, DeserializationContext ctxt, final JsonNodeFactory nodeFactory, final BaseNodeDeserializer.
Alternate deserialization method used when parser already points to first PROPERTY_NAME and not START_OBJECT. |
| protected final JsonNode | |
| protected final JsonNode | |
| protected final JsonNode | |
| protected final JsonNode | |
| protected final JsonNode | |
| protected void | _handleDuplicateProperty(JsonParser p, DeserializationContext ctxt, JsonNodeFactory nodeFactory, String
Name of the property for which duplicate value was found propName, ObjectNode Object node that contains values objectNode, JsonNode Value that existed for the object node before newValue
was added oldValue, JsonNode Newly added value just added to the object node newValue)Method called when there is a duplicate value for an Object property. |
| protected BigDecimal | |
| private static boolean | |
| public ValueDeserializer | createContextual(DeserializationContext ctxt, BeanProperty property)
Overrides tools. Method called to see if a different (or differently configured) deserializer is needed to deserialize values of specified property. |
| public Object | deserializeWithType(JsonParser p, DeserializationContext ctxt, TypeDeserializer typeDeserializer)
Overrides tools. Base implementation that does not assume specific type inclusion mechanism. |
| public boolean | isCachable()
Overrides tools. Method called to see if deserializer instance is cachable and usable for other properties of same type (type for which instance was created). |
| public LogicalType | logicalType()
Overrides tools. Method for accessing logical type of values this deserializer produces. |
| public Boolean | supportsUpdate(DeserializationConfig config)
Overrides tools. Introspection method that may be called to see whether deserializer supports update of an existing value (aka "merging") or not. |
| protected final JsonNode | updateObject(JsonParser p, DeserializationContext ctxt, final ObjectNode node, final BaseNodeDeserializer.
Alternate deserialization method that is to update existing |
| _mergeArrays | back to summary |
|---|---|
| protected final boolean _mergeArrays | |
| _mergeObjects | back to summary |
|---|---|
| protected final boolean _mergeObjects | |
| _supportsUpdates | back to summary |
|---|---|
| protected final Boolean _supportsUpdates | |
| BaseNodeDeserializer | back to summary |
|---|---|
| public BaseNodeDeserializer(Class<T> vc, Boolean supportsUpdates) | |
| BaseNodeDeserializer | back to summary |
|---|---|
| protected BaseNodeDeserializer(BaseNodeDeserializer<?> base, boolean mergeArrays, boolean mergeObjects) | |
| _createWithMerge | back to summary |
|---|---|
| protected abstract BaseNodeDeserializer | |
| _deserializeAnyScalar | back to summary |
|---|---|
| protected final JsonNode _deserializeAnyScalar(JsonParser p, DeserializationContext ctxt) throws JacksonException | |
| _deserializeContainerNoRecursion | back to summary |
|---|---|
| protected final ContainerNode | |
| _deserializeObjectAtName | back to summary |
|---|---|
| protected final ObjectNode _deserializeObjectAtName(JsonParser p, DeserializationContext ctxt, final JsonNodeFactory nodeFactory, final BaseNodeDeserializer. Alternate deserialization method used when parser already points to first PROPERTY_NAME and not START_OBJECT. | |
| _deserializeRareScalar | back to summary |
|---|---|
| protected final JsonNode _deserializeRareScalar(JsonParser p, DeserializationContext ctxt) throws JacksonException | |
| _fromEmbedded | back to summary |
|---|---|
| protected final JsonNode _fromEmbedded(JsonParser p, DeserializationContext ctxt) throws JacksonException | |
| _fromFloat | back to summary |
|---|---|
| protected final JsonNode _fromFloat(JsonParser p, DeserializationContext ctxt, final JsonNodeFactory nodeFactory) throws JacksonException | |
| _fromInt | back to summary |
|---|---|
| protected final JsonNode _fromInt(JsonParser p, int coercionFeatures, JsonNodeFactory nodeFactory) throws JacksonException | |
| _fromInt | back to summary |
|---|---|
| protected final JsonNode _fromInt(JsonParser p, DeserializationContext ctxt, JsonNodeFactory nodeFactory) throws JacksonException | |
| _handleDuplicateProperty | back to summary |
|---|---|
| protected void _handleDuplicateProperty(JsonParser p, DeserializationContext ctxt, JsonNodeFactory nodeFactory, String propName, ObjectNode objectNode, JsonNode oldValue, JsonNode newValue) throws JacksonException Method called when there is a duplicate value for an Object property. By default we don't care, and the last value is used. Can be overridden to provide alternate handling, such as throwing an exception, or choosing different strategy for combining values or choosing which one to keep.
| |
| _normalize | back to summary |
|---|---|
| protected BigDecimal _normalize(BigDecimal nr) | |
| _shouldMerge | back to summary |
|---|---|
| private static boolean _shouldMerge(Boolean specificMerge, Boolean generalMerge) | |
| createContextual | back to summary |
|---|---|
| public ValueDeserializer Overrides tools. Doc from tools. Method called to see if a different (or differently configured) deserializer is needed to deserialize values of specified property. Note that instance that this method is called on is typically shared one and as a result method should NOT modify this instance but rather construct and return a new instance. This instance should only be returned as-is, in case it is already suitable for use.
| |
| deserializeWithType | back to summary |
|---|---|
| public Object deserializeWithType(JsonParser p, DeserializationContext ctxt, TypeDeserializer typeDeserializer) throws JacksonException Overrides tools. Doc from tools. 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.
| |
| isCachable | back to summary |
|---|---|
| public boolean isCachable() Overrides tools. Doc from tools. Method called to see if deserializer instance is cachable and usable for other properties of same type (type for which instance was created).
Note that cached instances are still contextualized on per-property basis
(but note that Default implementation returns false, to indicate that no caching is done.
| |
| logicalType | back to summary |
|---|---|
| public LogicalType logicalType() Overrides tools. Doc from tools. Method for accessing logical type of values this deserializer produces. Typically used for further configuring handling of values, for example, to find which coercions are legal.
| |
| supportsUpdate | back to summary |
|---|---|
| public Boolean supportsUpdate(DeserializationConfig config) Overrides tools. Doc from tools. Introspection method that may be called to see whether deserializer supports
update of an existing value (aka "merging") or not. Return value should either
be
Information gathered is typically used to either prevent merging update for
property (either by skipping, if based on global defaults; or by exception during
deserializer construction if explicit attempt made) if
Default implementation returns
| |
| updateObject | back to summary |
|---|---|
| protected final JsonNode updateObject(JsonParser p, DeserializationContext ctxt, final ObjectNode node, final BaseNodeDeserializer. Alternate deserialization method that is to update existing | |
java.util.ArrayDeque ; used to hold enclosing Array/Object
nodes during recursion-as-iteration.
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private ContainerNode | |
| private int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public ContainerNode | |
| public void | |
| public int |
| _end | back to summary |
|---|---|
| private int _end | |
| _stack | back to summary |
|---|---|
| private ContainerNode<T extends ContainerNode<T>>[] _stack | |
| _top | back to summary |
|---|---|
| private int _top | |
| ContainerStack | back to summary |
|---|---|
| public ContainerStack() | |
| popOrNull | back to summary |
|---|---|
| public ContainerNode | |
| push | back to summary |
|---|---|
| public void push(ContainerNode<T extends ContainerNode<T>> node) | |
| size | back to summary |
|---|---|
| public int size() | |