如果我正确阅读了JSONArray构造函数,则可以从任何Collection生成它们(arrayList是Collection的子类),如下所示:
ArrayList<String> list = new ArrayList<String>();list.add("foo");list.add("baar");JSonArray jsArray = new JSonArray(list);参考文献:
- jsonarray构造函数:http : //developer.android.com/reference/org/json/JSONArray.html#JSONArray%28java.util.Collection%29
- 集合:http: //developer.android.com/reference/java/util/Collection.html



