On both sides I have:
Class ListWrapper {
public List<String> l;
ListWrapper(List<String> l) {
this.l = l;
}
}
On the client side I have:
ObjectMapper mapper = new ObjectMapper();
String fl;
try {
fl = mapper.writeValueAsString(new ListWrapper(u.getList()));
} catch (IOException e) {
fl = "null";
}
On the server side I have:
String data = getQuery().........;
List l = new ObjectMapper.readValue(data,ListWrapper.class).list;
Yet I'm getting:
org.codehaus.jackson.map.JsonMappingException: Can not create Bean deserializer for ([simple type, class il.ac.technion.ssdl.hitch.resource.ListWrapper]): neither default/delegating constructor nor factory methods found
When I'm trying to deserialize the list.
EDIT:
When printing the list on the client side I'm getting:
{"list":["v1","v2,"v3"]}