When I send this JSON to my web service:
{"input":[]}
I get in my class a List<String> with one element that is an empty string.
What I would like is a List<String> with 0 elements. Is there any way to
make it unmarshal to that?
This is the class that represents the JSON:
@XmlRootElement
public class ListTest {
public void setInput(List<String> val) {
this.input = val;
}
public List<String> getInput() {
return this.input;
}
private List<String> input = new ArrayList<String>();
}