Class JsonXmlCollectionDeserializer<T extends Collection<?>>
- Type Parameters:
T- type of collection
- All Implemented Interfaces:
tools.jackson.databind.deser.NullValueProvider
XML collection deserializer. Adds support for the JsonXmlCollection
annotation and reads collections back regardless of how the XML mapper
surfaces repeated child elements.
Registered through the JsonXmlCollectionModule deserializer modifier
for regular bean collection properties, and through @JsonDeserialize
(on the collection type or carried by JsonXmlCollection) for
collection properties of @JsonUnwrapped beans (such as
Configurable configuration objects),
which Jackson resolves through a path that bypasses deserializer modifiers.
The XML mapper presents the collection as a wrapper object holding the
entries. Depending on the entry kind, repeated elements appear either as a
JSON array (typically for object entries) or as repeated property names
(typically for scalar entries); a single entry appears as a lone value.
All of these shapes are handled here, as is the plain START_ARRAY
used by JSON and YAML.
- Since:
- 3.0.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class tools.jackson.databind.ValueDeserializer
tools.jackson.databind.ValueDeserializer.None -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiontools.jackson.databind.ValueDeserializer<?> createContextual(tools.jackson.databind.DeserializationContext ctx, tools.jackson.databind.BeanProperty property) deserialize(tools.jackson.core.JsonParser p, tools.jackson.databind.DeserializationContext ctx) Methods inherited from class tools.jackson.databind.ValueDeserializer
collectAllPropertyNamesTo, deserialize, deserializeWithType, deserializeWithType, findBackReference, getAbsentValue, getDelegatee, getEmptyAccessPattern, getEmptyValue, getKnownPropertyNames, getNullAccessPattern, getNullValue, getObjectIdReader, handledType, hasAnySetter, isCachable, logicalType, replaceDelegatee, resolve, supportsUpdate, unwrappingDeserializer
-
Constructor Details
-
JsonXmlCollectionDeserializer
public JsonXmlCollectionDeserializer()
-
-
Method Details
-
createContextual
public tools.jackson.databind.ValueDeserializer<?> createContextual(tools.jackson.databind.DeserializationContext ctx, tools.jackson.databind.BeanProperty property) - Overrides:
createContextualin classtools.jackson.databind.ValueDeserializer<T extends Collection<?>>
-
deserialize
public T deserialize(tools.jackson.core.JsonParser p, tools.jackson.databind.DeserializationContext ctx) - Specified by:
deserializein classtools.jackson.databind.ValueDeserializer<T extends Collection<?>>
-