I have something like
@XmlElementWrapper(name=\"Mylist\")
List myItems = new ArrayList()
and that comes out lik
you can accomplish that by making the field transient @XmlTransient
and creating a method for calculating a String with a comma-separated.
@XmlTransient
List myItems = new ArrayList()
@XmlElement(name = "myItems")
public String getItemsAsCommasSeparated() {
return String.join(", ", myItems);
}
About the wrapping
if it is really necessary you will have to wrap the list into a another object.