1.json转list

1 List<TenantMember> tm= (List<TenantMember>)JSONArray.toCollection(JSONArray.fromObject(jsonString), TenantMember.class);
1 List list = (List)JSONArray.toList(JSONArray.fromObject(json), Person.class);  
1  List list = (List)JSONArray.toList(JSONArray.fromObject(json), new Person(), new JsonConfig());

2.list转json

1 JSONArray jsonarray = JSONArray.fromObject(list);  

 

 

posted on 2016-07-21 11:38  筱筱鹿丸  阅读(241)  评论(0编辑  收藏  举报