I am building a RESTful web-service in Java using Jersey 1.11, and have problems implementing a method which consumes a list of JSON-ised entities. The single instance method wo
Ok, so in the end I solved this using a simple wrapper class in order to generate { items : [{
. I guess there is a way to have a generic wrapper but for now this will do:
@XmlRootElement
public class MyEntityWrapper implements Serializable {
private static final long serialVersionUID = 1L;
private List items;
public MyEntityWrapper() {
this.items = new ArrayList();
}
public MyEntityWrapper(List items) {
this.items = items;
}
public List getItems() {
return items;
}
public void setItems(List items) {
this.items = items;
}
}