将json数据转换成Map、List

Map<String, WzSupportProvince> citys = gson.fromJson(result,new TypeToken<Map<String, WzSupportProvince>>(){}.getType());

List<List<String>> list = gson.fromJson(jsonData, new TypeToken<List<List<String>>>(){}.getType());
System.out.println(list.get(0).get(0));
System.out.println(list.get(0).get(1));
System.out.println(list.get(0).get(2)); 
posted @ 2015-03-03 17:19  独孤骑士  阅读(816)  评论(0编辑  收藏  举报