I guess the problem is caused by inlining. If you don't use inline
, simple will put all elements as childs into a set-tag. This tag contains e.g. a class="java.util.LinkedHashSet"
attribute, what makes it possible to decide the set-implementation.
But this is impossible for an inline-collection, so simple takes a default one.
What you can do:
- Use
private LinkedHashSet<Item> items;
as you've already written - this makes very clear what implementation you want - Use a constructor where you instantiate the implementation:
public Items() { this.items = new LinkedHashSet<>(); }
- Write a
Converter
, where you handle the deserialisation by your own (possible an overkill).