public Object unmarshall(SerializerState state, Class clazz, Object o) throws UnmarshallException {
JSONObject jso = (JSONObject) o;
String java_class = jso.getString("javaClass");
if (java_class == null)
throw new UnmarshallException("no type hint");
AbstractList al = null;
if (java_class.equals("java.util.List") || java_class.equals("java.util.AbstractList")
|| java_class.equals("java.util.ArrayList")) {
al = new ArrayList();
} else if (java_class.equals("java.util.LinkedList")) {
al = new LinkedList();
} else if (java_class.equals("java.util.Vector")) {
al = new Vector();
} else {
throw new UnmarshallException("not a List");
}
JSONArray jsonlist = jso.getJSONArray("list");
if (jsonlist == null)
throw new UnmarshallException("list missing");
int i = 0;
try {
for (; i < jsonlist.length(); i++)
al.add(ser.unmarshall(state, null, jsonlist.get(i)));
} catch (UnmarshallException e) {
throw new UnmarshallException("element " + i + " " + e.getMessage());
}
return al;
}