一、//将map转换成jsonObject html
JSONObject itemJSONObj = JSONObject.parseObject(JSON.toJSONString(itemMap));json
将Map类型的itemInfo转换成json,再经JSONObject转换实现。
二、//将jsonObj转换成Map
Map<String, Object> itemMap = JSONObject.toJavaObject(itemJSONObj, Map.class);post
//JOSN.parseObjet()方法一样能够转换.net
三、//将List转换成JSONArrayhtm
JSONArray ja = JSONArray.parseArray(JSON.toJSONString(itemList));对象
四、//将JSONArray转换成Listblog
这个涉及功能比较广,有达人整理的更为完善。it
连接以下:class
http://www.cnblogs.com/goody9807/p/4244862.htmlList
5 json转成对象
List<ChannelItem> channelItemList = JSON.parseArray(itemJson,ChannelItem.class);