Elementlistunion - Simple Xml Giving Duplicate Annotation For Generic List Objects
I am trying to deserialize a List field using elementlistunion Customer.java @ElementListUnion({ @ElementList(inline = false, type = Thing.class), @ElementList(inline =
Solution 1:
I don't know why are you trying to make two classes in ElementsListUnion. You can use
@ElementList(inline = false, type = Thing.class)
instead of this or
@ElementListUnion({ @ElementList(inline = false, type = Thing.class, required = false),
@ElementList(inline = false, type = AnotherThing.class, required = false) })
if you don't send two elements types every time.
Post a Comment for "Elementlistunion - Simple Xml Giving Duplicate Annotation For Generic List Objects"