Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support use of xsi:type for polymorphic deserialization (FromXmlParser.Feature.AUTO_DETECT_XSI_TYPE) #634

Closed
cowtowncoder opened this issue Jan 31, 2024 · 0 comments
Labels
2.17 Issues planned at earliest for 2.17

Comments

@cowtowncoder
Copy link
Member

(note: counterpart to generation-side #324 just implemented)

It is now possible to serializer POJOs like this one:

    @JsonRootName("Poly")
    @JsonTypeInfo(use = Id.SIMPLE_NAME, include = As.PROPERTY, property="xsi:type")
    static class PolyBean {
        public int value = 42;
    }

resulting in XML like:

<Poly xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:type='PolyBean'>"
  <value>42</value>
</Poly>

which is all fine; but we also need to support the part, deserialization, for seamless usability.
So let's do just that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.17 Issues planned at earliest for 2.17
Projects
None yet
Development

No branches or pull requests

1 participant