Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.6
-
Component/s: Deserializer, JAXB annotation handler, Serializer
-
Labels:None
-
Number of attachments :
Description
(note: for more information, check out JDK Javadocs for javax.xml.bind.annotation.XmlAnyElement, section "Using XmlAnyElement with XmlElementRef")
Earlier, assumption was that XmlAnyElement would only work with DOM Element type. But after re-reading javadocs (and seeing some references to it from JAXB samples), I realized that there are multiple use cases; and one of them would fit with the new Polymorphic Type Handling. Currently only @XmlElements annotation is considered for PTH; but @XmlAnyElement should ideally be also supported.
On a related note: perhaps @XmlAnyAttribute should also be supported in some fashion – maybe as an alias for @JsonAnySetter?