Liste<Map<String,Object>> de org.json.JSONObject?

List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
Map<String, Object> map = new HashMap<String, Object>();

map.put("abc", "123456");
map.put("def", "hmm");
list.add(map);
JSONObject json = new JSONObject(list);
try {
    System.err.println(json.toString(2));
} catch (JSONException e) {
    e.printStackTrace();
}

Quel est le problème avec ce code?

La sortie est:

{"empty": false}
InformationsquelleAutor yogman | 2009-02-04