private static Map<String, Object> serializeList(List<Object> list) {
        Map<String, Object> data = new HashMap<String, Object>();
        data.put("T", "L");
        data.put("class", list.getClass().getName());
        List<Object> objList = new ArrayList<Object>(list.size());
        for (Object o : list) {
            objList.add(serialize(o));
        }
        data.put("data", objList);
        return data;
    }