相关的jar包 https://download.csdn.net/download/qq_37591637/11162911
package cn.com.tools;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
public class Test {
public static void main(String[] args) {
/*author:命运的信徒
* date:2019/5/18
*/
String str ="[{'otitle':'会','source':'7'},{'otitle':'不会','source':'3'}]";
//1.把字符串类型的json数组对象转化JSONArray
JSONArray json=JSONArray.fromObject(str);
//2、循环遍历这个数组
for(int i=0;i