import net.sf.json.*;
import java.io.*;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;
import java.util.List;public classfindElectSet {/** 取出文件内容,填充对象*/
public ListwriteFile(String path) {
List tableAS = new ArrayList<>();
String sets= ReadFile(path);//获得json文件的内容
JSONObject jsonObject= JSONObject.fromObject(sets);//格式化成json对象
Object data = jsonObject.get(“data”);
JSONObject jsonObject1=JSONObject.fromObject(data);
String list= jsonObject1.getString(“list”);
JSONArray jsonArray=JSONArray.fromObject(list);
List tableAList = new ArrayList<>();for(Object o : jsonArray) {
JSONObject jo=JSONObject.fromObject(o);
TableA tableA= newTableA();
tableA.setId(jo.getString(“id”));
tableA.setZbbmText(jo