jackson-databind
jackson-databind copied to clipboard
Update `MapDeserializer` to support `StreamReadCapability.DUPLICATE_PROPERTIES`
(note: needed to resolve https://github.com/FasterXML/jackson-dataformat-xml/issues/498)
With Jackson 2.12 a system of StreamReadCapability
options was introduced; one being DUPLICATE_PROPERTIES
.
This capability is true for content formats like XML where underlying content may be exposed in a way that can produce seeming "duplicate" properties (in case of XML, a sequence of elements with same name).
These are, in turn, handled by coercing sequences of duplicates into implicit arrays.
Unfortunately duplicate coercion is only implemented for "untyped" values (nominal type of Object.class
), by UntypedObjectDeserializer
, and for JsonNode
.
But it is not implemented yet for MapDeserializer
. It should be.