import java.util.*;
import com.alibaba.fastjson.*;
public class Test {
public static void main(String[] args) {
//方法1
String json = "[{\"companyId\":\"111111111\",\"companyName\":\"Huuuu\",\"_uid\":10,\"_index\":0,\"_state\":\"modified\"},{\"companyId\":\"000000000000000000\",\"companyName\":\"cx01\",\"_uid\":11,\"_index\":1,\"_state\":\"modified\"},{\"companyId\":\"9999999999999\",\"companyName\":\"ttt\",\"_uid\":12,\"_index\":2,\"_state\":\"modified\"}]";
List list =JSON.parseArray(json, HashMap.class);
for(int i=0;i
System.out.println(list.get(i).get("companyId"));;
}
//方法2
/*
JSONArray jarr = JSONArray.parseArray(json);
for (Iterator iterator = jarr.iterator(); iterator.hasNext();) {
JSONObject job = (JSONObject) iterator.next();
System.out.println(job.get("companyId").toString());
}*/
}
}