方法1:
JSONArray jsonArrayRows=jsonResp.getJSONArray("data");
List<Person> _persons=(List<Person>)JSONArray.toList(jsonArrayRows, Person.class);
Object[] _persons2 =(Object[])JSONArray.toArray(jsonArrayRows,Person.class);
方法2:取值依次赋值
List<DataObject> persons = null;
DataObject[] persons2 = null;
for(int i=0;i<jsonArrayRows.size();i++) {
net.sf.json.JSONObject jsonObjectRow=(net.sf.json.JSONObject)jsonArrayRows.get(i);
//初始化对象
((Person) person).setNAME(jsonObjectRow.get("NAME").toString());
persons.add(person);
persons2[i]=person;
}