阿里的fastJson.jar:
//list轉換為json List<CustPhone> list = new ArrayList<CustPhone>(); String str=JSON.toJSON(list).toString();
- 1
- 2
- 3
//json轉換為list List<Person> list = new ArrayList<Person>(); list = JSONObject.parseArray(jasonArray, Person.class);