JSONArray可能就是您想要的。
String message;JSonObject json = new JSonObject();json.put("name", "student");JSonArray array = new JSonArray();JSonObject item = new JSonObject();item.put("information", "test");item.put("id", 3);item.put("name", "course1");array.add(item);json.put("course", array);message = json.toString();// message// {"course":[{"id":3,"information":"test","name":"course1"}],"name":"student"}


