Skip to content

Support for multiple alternative names during parsing? #174

Open

Description

@Guimareshh

Hello!
First of all all thanks for this amazing library!

I was wondering if it's possible to have multiple names during parsing? Like @JsonNames in Kotlin.Serialization. Currently @XmlSerialName is not repeatable.

Thanks!

Activity

  1. pdvrieze commented on Aug 17, 2023

    @pdvrieze
    Owner

    You're welcome. Currently there is no direct support for matching broader names. This doesn't mean you can not make this work. I may provide more direct support but it would work the same way as the explicit way (just provide some convenience).

    The explicit way is to use a filtering XmlReader (rather than directly deserializing from string/reader/inputstream - the directs are just shortcuts). The filter can then apply renames as needed (without having to make the serialization itself even more complex).

    ps. the serialization plugin doesn't support repeatable annotations (only one is retained)

  2. Guimareshh commented on Aug 18, 2023

    @Guimareshh
    Author

    Thanks for your answer, I might use a filtering XmlReader then!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions