Closed sschuberth closed 3 months ago
The reason is that a (non-value) class can not be a text value. While it is possible to use the policy to force a single-element class to be interpreted as a value class this is not currently implemented. Of course you can create your own policy (extending the default one or not) that does so.
Ah, I keep forgetting about Kotlin's value
classes. So the proper solution would be to simply switch my data
classes to these?
Sorry, I was completely mislead here. In my case "include" actually is a tag in the original XML file, not an attribute. So the initially described use-case is invalid.
I have two simple classes like
My understanding of this is that
Manifest.include
should be (de-)serialized as an attribute (not an element) due to my@XmlElement(false)
annotation, but I'm gettingSo
include
is being looked up as an element, which causes the name to be derived from the type instead of the property name, and also the wrong name ("Include" instead of "include") to be used.Is my understanding of how things are supposed to work wrong?