Skip to content

XmlMapper/UntypedObjectDeserializer mixes multiple unwrapped collections #445

@drewko

Description

@drewko

Hi I found an issue with deserializing xml node containg multiple unwrapped collections.

Entity

<person>
    <name>a</name>
    <name>b</name>
    <surname>c</surname>
    <surname>d</surname>
</person>

Code

new XmlMapper().readValue(xml, Object.class);

Output

{
    name = [ c, d ], 
    surname = d
}

Problem
Could not deserialize node that contains multiple unwrapped collections. If I remove one surname, so that name is the only collection - it works properly.

Version: 2.12.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions