package com.kigang.test;import net.sf.json.JSONArray;import net.sf.json.JSONObject;import java.util.Iterator;/** * @author qqg * @description jsonArray测试 * @date 2018/1/24 */public class JSONArrayTest { public static void main(String[] args) { JSONArray array = new JSONArray(); JSONObject object = new JSONObject(); object.put("userId","15032"); object.put("topTitle","标题"); object.put("topContent","内容"); JSONObject object1 = new JSONObject(); object1.put("userId","15032"); object1.put("topTitle","标题"); array.add(object); array.add(object1); System.out.println("array:"+array.toString()); Iterator