You have not set a value for entry, so Simple cannot decide which class you are using. See here:
@Root(name = "Customer")
public class Customer
{
@ElementListUnion(
{
@ElementList(entry = "thingValue", inline = true, type = Thing.class),
@ElementList(entry = "anotherThingValue", inline = true, type = AnotherThing.class)
})
List<Object> things;
@ElementListUnion(
{
@ElementList(entry = "thingValue", inline = true, type = Thing.class),
@ElementList(entry = "anotherThingValue", inline = true, type = AnotherThing.class)
})
List<Object> anotherthings;
}
For each , it is @ElementListrequired entry, that is, the tag that is used for the element:
<Customer>
<thingValue>...<thingValue/>
<anotherThingValue>...<anotherThingValue/>
</Customer>
, entry , entry = "thing" .