Java中利用gson解析Json实例教程-创新互联
前言
成都创新互联长期为上1000家客户提供的网站建设服务,团队从业经验10年,关注不同地域、不同群体,并针对不同对象提供差异化的产品和服务;打造开放共赢平台,与合作伙伴共同营造健康的互联网生态环境。为七台河企业提供专业的成都做网站、成都网站制作,七台河网站改版等技术服务。拥有10多年丰富建站经验和众多成功案例,为您定制开发。本文主要跟大家介绍了关于Java用gson解析Json的相关内容,分享出来供大家参考学习,需要的朋友们下面来一起看看吧。
json数据
{ "resultcode": "200", "reason": "successed!", "result": { "sk": { "temp": "24", "wind_direction": "西南风", "wind_strength": "2级", "humidity": "51%", "time": "10:11" }, "today": { "temperature": "16℃~27℃", "weather": "阴转多云", "weather_id": { "fa": "02", "fb": "01" }, "wind": "西南风3-4 级", "week": "星期四", "city": "滨州", "date_y": "2015年06月04日", "dressing_index": "舒适", "dressing_advice": "建议着长袖T恤、衬衫加单裤等服装。年老体弱者宜着针织长袖衬衫、马甲和长裤。", "uv_index": "最弱", "comfort_index": "", "wash_index": "较适宜", "travel_index": "", "exercise_index": "较适宜", "drying_index": "" }, "future": [ { "temperature": "16℃~27℃", "weather": "阴转多云", "weather_id": { "fa": "02", "fb": "01" }, "wind": "西南风3-4 级", "week": "星期四", "date": "20150604" }, { "temperature": "20℃~32℃", "weather": "多云转晴", "weather_id": { "fa": "01", "fb": "00" }, "wind": "西风3-4 级", "week": "星期五", "date": "20150605" }, { "temperature": "23℃~35℃", "weather": "多云转阴", "weather_id": { "fa": "01", "fb": "02" }, "wind": "西南风3-4 级", "week": "星期六", "date": "20150606" }, { "temperature": "20℃~33℃", "weather": "多云", "weather_id": { "fa": "01", "fb": "01" }, "wind": "北风微风", "week": "星期日", "date": "20150607" }, { "temperature": "22℃~34℃", "weather": "多云", "weather_id": { "fa": "01", "fb": "01" }, "wind": "西南风3-4 级", "week": "星期一", "date": "20150608" }, { "temperature": "22℃~33℃", "weather": "阴", "weather_id": { "fa": "02", "fb": "02" }, "wind": "西南风3-4 级", "week": "星期二", "date": "20150609" }, { "temperature": "22℃~33℃", "weather": "多云", "weather_id": { "fa": "01", "fb": "01" }, "wind": "南风3-4 级", "week": "星期三", "date": "20150610" } ] }, "error_code": 0 }
当前标题:Java中利用gson解析Json实例教程-创新互联
本文URL:http://cdiso.cn/article/cechos.html