在做天气预报的案例的时候,,,获取到这么一段字符串:
weather_callback({"weatherinfo":{"city_en":"beijing","city":"北京","cityid":"101010100","week":"星期五","date_y":"2016年12月30日","fchh":53,"date":"201612301800","dt":4,"fl1":"微风","fl2":"微风","fl3":"微风","fl4":"微风","fl5":"微风","fl6":"微风","fx1":"南风","fx2":"南风","img1":"53","img2":"53","img3":"53","img4":"53","img5":"53","img6":"53","img7":"0","img8":"0","img9":"0","img10":"53","img11":"53","img12":"53","img_single":"53","img_title1":"霾","img_title2":"霾","img_title3":"霾","img_title4":"霾","img_title5":"霾","img_title6":"霾","img_title7":"晴","img_title8":"晴","img_title9":"晴","img_title10":"霾","img_title11":"霾","img_title12":"霾","img_title_single":"霾","pm":"357","pm-level":"严重污染","pm-num":"6","pm-pubtime":"2016-12-30 19:00:00","pm-url":"","rl1":"16:58","rc1":"07:35","rl2":"16:59","rc2":"07:35","sd":"71%","st1":"53","st2":"53","st3":"53","st4":"0","st5":"0","st6":"53","temp":"-2","temp1":"-6℃","tempF1":"28.4℃~21.2℃","temp2":"4℃~-5℃","tempF2":"39.2℃~23℃","temp3":"6℃~-3℃","tempF3":"42.8℃~26.6℃","temp4":"7℃~-5℃","tempF4":"44.6℃~23℃","temp5":"7℃~-4℃","tempF5":"44.6℃~24.8℃","temp6":"5℃~-3℃","tempF6":"41℃~26.6℃","wd":"西南风","weather1":"霾","weather2":"霾","weather3":"霾","weather4":"晴","weather5":"晴","weather6":"霾","wind1":"微风","wind2":"微风","wind3":"微风","wind4":"微风","wind5":"微风","wind6":"微风","ws":"1级","wse":"1"},"update_time":"2016-12-30 20:25:02","t":1483102283,"from":"cache"})
怎么才能简单粗暴的把他转换成map集合或其他容易读取的类型。。。。
求解。。。。。
|
|