--json、map均适用
public static void main(String args[]){
Map<String,String> test = new HashMap<>();
test.put("a","1");
test.put("b","2");
for (String key:test.keySet()) {
System.out.println(key+":"+test.get(key));
}
}
–Array
public static void main(String args[]){
JSONArray test = new JSONArray();
test.add(“a”);
test.add(“b”);
Iterator it = test.iterator();
while (it.hasNext()){
System.out.println(it.next());
}
}