JSONArray jArray = new JSONArray();
JSONObject jObj = new JSONObject();
jObj.put("A", "B");
jArray.put(jObj);JSONObject root = new JSONObject();
root.put("root", jArray);