使用as插件G送Format创建类的时候出现错误:
json数据如下:
{"HeWeather data service 3.0":[{"aqi":{"city":{"aqi":"50","co":"0","no2":"34","o3":"45","pm10":"50","pm25":"26","qlty":"优","so2":"3"}},"basic":{"city":"北京","cnty":"中国","id":"CN101010100","lat":"39.904000","lon":"116.391000","update":{"loc":"2016-10-23 17:16","utc":"2016-10-23 09:16"}},"daily_forecast":[{"astro":{"sr":"06:33","ss":"17:23"},"cond":{"code_d":"101","code_n":"101","txt_d":"多云","txt_n":"多云"},"date":"2016-10-23","hum":"54","pcpn":"0.0","pop":"1","pres":"1023","tmp":{"max":"15","min":"5"},"vis":"10","wind":{"deg":"183","dir":"无持续风向","sc":"微风","spd":"6"}},{"astro":{"sr":"06:34","ss":"17:22"},"cond":{"code_d":"502","code_n":"502","txt_d":"霾","txt_n":"霾"},"date":"2016-10-24","hum":"69","pcpn":"4.8","pop":"43","pres":"1018","tmp":{"max":"13","min":"6"},"vis":"9","wind":{"deg":"183","dir":"无持续风向","sc":"微风","spd":"7"}},{"astro":{"sr":"06:35","ss":"17:21"},"cond":{"code_d":"502","code_n":"502","txt_d":"霾","txt_n":"霾"},"date":"2016-10-25","hum":"78","pcpn":"0.0","pop":"0","pres":"1016","tmp":{"max":"17","min":"8"},"vis":"10","wind":{"deg":"166","dir":"无持续风向","sc":"微风","spd":"3"}},{"astro":{"sr":"06:36","ss":"17:19"},"cond":{"code_d":"101","code_n":"104","txt_d":"多云","txt_n":"阴"},"date":"2016-10-26","hum":"57","pcpn":"0.0","pop":"0","pres":"1024","tmp":{"max":"17","min":"9"},"vis":"10","wind":{"deg":"148","dir":"无持续风向","sc":"微风","spd":"3"}},{"astro":{"sr":"06:38","ss":"17:18"},"cond":{"code_d":"104","code_n":"100","txt_d":"阴","txt_n":"晴"},"date":"2016-10-27","hum":"84","pcpn":"6.9","pop":"99","pres":"1026","tmp":{"max":"16","min":"9"},"vis":"8","wind":{"deg":"16","dir":"无持续风向","sc":"微风","spd":"7"}},{"astro":{"sr":"06:39","ss":"17:17"},"cond":{"code_d":"100","code_n":"100","txt_d":"晴","txt_n":"晴"},"date":"2016-10-28","hum":"41","pcpn":"0.0","pop":"3","pres":"1030","tmp":{"max":"14","min":"5"},"vis":"10","wind":{"deg":"349","dir":"无持续风向","sc":"微风","spd":"3"}},{"astro":{"sr":"06:40","ss":"17:15"},"cond":{"code_d":"100","code_n":"100","txt_d":"晴","txt_n":"晴"},"date":"2016-10-29","hum":"32","pcpn":"0.0","pop":"1","pres":"1032","tmp":{"max":"13","min":"3"},"vis":"10","wind":{"deg":"190","dir":"无持续风向","sc":"微风","spd":"9"}}],"hourly_forecast":[{"date":"2016-10-23 19:00","hum":"54","pop":"0","pres":"1020","tmp":"12","wind":{"deg":"196","dir":"西南风","sc":"微风","spd":"6"}},{"date":"2016-10-23 22:00","hum":"57","pop":"0","pres":"1021","tmp":"10","wind":{"deg":"213","dir":"西南风","sc":"微风","spd":"5"}}],"now":{"cond":{"code":"101","txt":"多云"},"fl":"15","hum":"38","pcpn":"0","pres":"1021","tmp":"14","vis":"10","wind":{"deg":"184","dir":"西南风","sc":"4-5","spd":"24"}},"status":"ok","suggestion":{"comf":{"brf":"舒适","txt":"白天不太热也不太冷,风力不大,相信您在这样的天气条件下,应会感到比较清爽和舒适。"},"cw":{"brf":"较适宜","txt":"较适宜洗车,未来一天无雨,风力较小,擦洗一新的汽车至少能保持一天。"},"drsg":{"brf":"较冷","txt":"建议着厚外套加毛衣等服装。年老体弱者宜着大衣、呢外套加羊毛衫。"},"flu":{"brf":"较易发","txt":"天气较凉,较易发生感冒,请适当增加衣服。体质较弱的朋友尤其应该注意防护。"},"sport":{"brf":"较不宜","txt":"天气较好,但考虑天气寒冷,推荐您进行各种室内运动,若在户外运动请注意保暖并做好准备活动。"},"trav":{"brf":"适宜","txt":"天气较好,但丝毫不会影响您出行的心情。温度适宜又有微风相伴,适宜旅游。"},"uv":{"brf":"弱","txt":"紫外线强度较弱,建议出门前涂擦SPF在12-15之间、PA+的防晒护肤品。"}}}]}
错误原因:
新建的类里面含有非法的变量:
List<HeWeather data service 3.0Bean>
HeWeather data service 3.0
改正之后即可:
package com.example.administrator.retiofitrxjava;
import com.google.gson.Gson;
import com.google.gson.annotations.SerializedName;
import java.util.List;
/**
* Created by Administrator on 2016/10/23.
*/
public class MyJsonData {
/**
* aqi : {"city":{"aqi":"50","co":"0","no2":"34","o3":"45","pm10":"50","pm25":"26","qlty":"优","so2":"3"}}
* basic : {"city":"北京","cnty":"中国","id":"CN101010100","lat":"39.904000","lon":"116.391000","update":{"loc":"2016-10-23 17:16","utc":"2016-10-23 09:16"}}
* daily_forecast : [{"astro":{"sr":"06:33","ss":"17:23"},"cond":{"code_d":"101","code_n":"101","txt_d":"多云","txt_n":"多云"},"date":"2016-10-23","hum":"54","pcpn":"0.0","pop":"1","pres":"1023","tmp":{"max":"15","min":"5"},"vis":"10","wind":{"deg":"183","dir":"无持续风向","sc":"微风","spd":"6"}},{"astro":{"sr":"06:34","ss":"17:22"},"cond":{"code_d":"502","code_n":"502","txt_d":"霾","txt_n":"霾"},"date":"2016-10-24","hum":"69","pcpn":"4.8","pop":"43","pres":"1018","tmp":{"max":"13","min":"6"},"vis":"9","wind":{"deg":"183","dir":"无持续风向","sc":"微风","spd":"7"}},{"astro":{"sr":"06:35","ss":"17:21"},"cond":{"code_d":"502","code_n":"502","txt_d":"霾","txt_n":"霾"},"date":"2016-10-25","hum":"78","pcpn":"0.0","pop":"0","pres":"1016","tmp":{"max":"17","min":"8"},"vis":"10","wind":{"deg":"166","dir":"无持续风向","sc":"微风","spd":"3"}},{"astro":{"sr":"06:36","ss":"17:19"},"cond":{"code_d":"101","code_n":"104","txt_d":"多云","txt_n":"阴"},"date":"2016-10-26","hum":"57","pcpn":"0.0","pop":"0","pres":"1024","tmp":{"max":"17","min":"9"},"vis":"10","wind":{"deg":"148","dir":"无持续风向","sc":"微风","spd":"3"}},{"astro":{"sr":"06:38","ss":"17:18"},"cond":{"code_d":"104","code_n":"100","txt_d":"阴","txt_n":"晴"},"date":"2016-10-27","hum":"84","pcpn":"6.9","pop":"99","pres":"1026","tmp":{"max":"16","min":"9"},"vis":"8","wind":{"deg":"16","dir":"无持续风向","sc":"微风","spd":"7"}},{"astro":{"sr":"06:39","ss":"17:17"},"cond":{"code_d":"100","code_n":"100","txt_d":"晴","txt_n":"晴"},"date":"2016-10-28","hum":"41","pcpn":"0.0","pop":"3","pres":"1030","tmp":{"max":"14","min":"5"},"vis":"10","wind":{"deg":"349","dir":"无持续风向","sc":"微风","spd":"3"}},{"astro":{"sr":"06:40","ss":"17:15"},"cond":{"code_d":"100","code_n":"100","txt_d":"晴","txt_n":"晴"},"date":"2016-10-29","hum":"32","pcpn":"0.0","pop":"1","pres":"1032","tmp":{"max":"13","min":"3"},"vis":"10","wind":{"deg":"190","dir":"无持续风向","sc":"微风","spd":"9"}}]
* hourly_forecast : [{"date":"2016-10-23 19:00","hum":"54","pop":"0","pres":"1020","tmp":"12","wind":{"deg":"196","dir":"西南风","sc":"微风","spd":"6"}},{"date":"2016-10-23 22:00","hum":"57","pop":"0","pres":"1021","tmp":"10","wind":{"deg":"213","dir":"西南风","sc":"微风","spd":"5"}}]
* now : {"cond":{"code":"101","txt":"多云"},"fl":"15","hum":"38","pcpn":"0","pres":"1021","tmp":"14","vis":"10","wind":{"deg":"184","dir":"西南风","sc":"4-5","spd":"24"}}
* status : ok
* suggestion : {"comf":{"brf":"舒适","txt":"白天不太热也不太冷,风力不大,相信您在这样的天气条件下,应会感到比较清爽和舒适。"},"cw":{"brf":"较适宜","txt":"较适宜洗车,未来一天无雨,风力较小,擦洗一新的汽车至少能保持一天。"},"drsg":{"brf":"较冷","txt":"建议着厚外套加毛衣等服装。年老体弱者宜着大衣、呢外套加羊毛衫。"},"flu":{"brf":"较易发","txt":"天气较凉,较易发生感冒,请适当增加衣服。体质较弱的朋友尤其应该注意防护。"},"sport":{"brf":"较不宜","txt":"天气较好,但考虑天气寒冷,推荐您进行各种室内运动,若在户外运动请注意保暖并做好准备活动。"},"trav":{"brf":"适宜","txt":"天气较好,但丝毫不会影响您出行的心情。温度适宜又有微风相伴,适宜旅游。"},"uv":{"brf":"弱","txt":"紫外线强度较弱,建议出门前涂擦SPF在12-15之间、PA+的防晒护肤品。"}}
*/
@SerializedName("HeWeather data service 3.0")
private List<HeWeatherdataserviceBean> HeWeatherdataservice;
public List<HeWeatherdataserviceBean> getHeWeatherdataservice() {
return HeWeatherdataservice;
}
public void setHeWeatherdataservice(List<HeWeatherdataserviceBean> HeWeatherdataservice) {
this.HeWeatherdataservice = HeWeatherdataservice;
}
public static class HeWeatherdataserviceBean {
/**
* city : {"aqi":"50","co":"0","no2":"34","o3":"45","pm10":"50","pm25":"26","qlty":"优","so2":"3"}
*/
private AqiBean aqi;
/**
* city : 北京
* cnty : 中国
* id : CN101010100
* lat : 39.904000
* lon : 116.391000
* update : {"loc":"2016-10-23 17:16","utc":"2016-10-23 09:16"}
*/
private BasicBean basic;
/**
* cond : {"code":"101","txt":"多云"}
* fl : 15
* hum : 38
* pcpn : 0
* pres : 1021
* tmp : 14
* vis : 10
* wind : {"deg":"184","dir":"西南风","sc":"4-5","spd":"24"}
*/
private NowBean now;
private String status;
/**
* comf : {"brf":"舒适","txt":"白天不太热也不太冷,风力不大,相信您在这样的天气条件下,应会感到比较清爽和舒适。"}
* cw : {"brf":"较适宜","txt":"较适宜洗车,未来一天无雨,风力较小,擦洗一新的汽车至少能保持一天。"}
* drsg : {"brf":"较冷","txt":"建议着厚外套加毛衣等服装。年老体弱者宜着大衣、呢外套加羊毛衫。"}
* flu : {"brf":"较易发","txt":"天气较凉,较易发生感冒,请适当增加衣服。体质较弱的朋友尤其应该注意防护。"}
* sport : {"brf":"较不宜","txt":"天气较好,但考虑天气寒冷,推荐您进行各种室内运动,若在户外运动请注意保暖并做好准备活动。"}
* trav : {"brf":"适宜","txt":"天气较好,但丝毫不会影响您出行的心情。温度适宜又有微风相伴,适宜旅游。"}
* uv : {"brf":"弱","txt":"紫外线强度较弱,建议出门前涂擦SPF在12-15之间、PA+的防晒护肤品。"}
*/
private SuggestionBean suggestion;
/**
* astro : {"sr":"06:33","ss":"17:23"}
* cond : {"code_d":"101","code_n":"101","txt_d":"多云","txt_n":"多云"}
* date : 2016-10-23
* hum : 54
* pcpn : 0.0
* pop : 1
* pres : 1023
* tmp : {"max":"15","min":"5"}
* vis : 10
* wind : {"deg":"183","dir":"无持续风向","sc":"微风","spd":"6"}
*/
private List<DailyForecastBean> daily_forecast;
/**
* date : 2016-10-23 19:00
* hum : 54
* pop : 0
* pres : 1020
* tmp : 12
* wind : {"deg":"196","dir":"西南风","sc":"微风","spd":"6"}
*/
private List<HourlyForecastBean> hourly_forecast;
public static HeWeatherdataserviceBean objectFromData(String str) {
return new Gson().fromJson(str, HeWeatherdataserviceBean.class);
}
public AqiBean getAqi() {
return aqi;
}
public void setAqi(AqiBean aqi) {
this.aqi = aqi;
}
public BasicBean getBasic() {
return basic;
}
public void setBasic(BasicBean basic) {
this.basic = basic;
}
public NowBean getNow() {
return now;
}
public void setNow(NowBean now) {
this.now = now;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public SuggestionBean getSuggestion() {
return suggestion;
}
public void setSuggestion(SuggestionBean suggestion) {
this.suggestion = suggestion;
}
public List<DailyForecastBean> getDaily_forecast() {
return daily_forecast;
}
public void setDaily_forecast(List<DailyForecastBean> daily_forecast) {
this.daily_forecast = daily_forecast;
}
public List<HourlyForecastBean> getHourly_forecast() {
return hourly_forecast;
}
public void setHourly_forecast(List<HourlyForecastBean> hourly_forecast) {
this.hourly_forecast = hourly_forecast;
}
public static class AqiBean {
/**
* aqi : 50
* co : 0
* no2 : 34
* o3 : 45
* pm10 : 50
* pm25 : 26
* qlty : 优
* so2 : 3
*/
private CityBean city;
public static AqiBean objectFromData(String str) {
return new Gson().fromJson(str, AqiBean.class);
}
public CityBean getCity() {
return city;
}
public void setCity(CityBean city) {
this.city = city;
}
public static class CityBean {
private String aqi;
private String co;
private String no2;
private String o3;
private String pm10;
private String pm25;
private String qlty;
private String so2;
public static CityBean objectFromData(String str) {
return new Gson().fromJson(str, CityBean.class);
}
public String getAqi() {
return aqi;
}
public void setAqi(String aqi) {
this.aqi = aqi;
}
public String getCo() {
return co;
}
public void setCo(String co) {
this.co = co;
}
public String getNo2() {
return no2;
}
public void setNo2(String no2) {
this.no2 = no2;
}
public String getO3() {
return o3;
}
public void setO3(String o3) {
this.o3 = o3;
}
public String getPm10() {
return pm10;
}
public void setPm10(String pm10) {
this.pm10 = pm10;
}
public String getPm25() {
return pm25;
}
public void setPm25(String pm25) {
this.pm25 = pm25;
}
public String getQlty() {
return qlty;
}
public void setQlty(String qlty) {
this.qlty = qlty;
}
public String getSo2() {
return so2;
}
public void setSo2(String so2) {
this.so2 = so2;
}
}
}
public static class BasicBean {
private String city;
private String cnty;
private String id;
private String lat;
private String lon;
/**
* loc : 2016-10-23 17:16
* utc : 2016-10-23 09:16
*/
private UpdateBean update;
public static BasicBean objectFromData(String str) {
return new Gson().fromJson(str, BasicBean.class);
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getCnty() {
return cnty;
}
public void setCnty(String cnty) {
this.cnty = cnty;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getLat() {
return lat;
}
public void setLat(String lat) {
this.lat = lat;
}
public String getLon() {
return lon;
}
public void setLon(String lon) {
this.lon = lon;
}
public UpdateBean getUpdate() {
return update;
}
public void setUpdate(UpdateBean update) {
this.update = update;
}
public static class UpdateBean {
private String loc;
private String utc;
public static UpdateBean objectFromData(String str) {
return new Gson().fromJson(str, UpdateBean.class);
}
public String getLoc() {
return loc;
}
public void setLoc(String loc) {
this.loc = loc;
}
public String getUtc() {
return utc;
}
public void setUtc(String utc) {
this.utc = utc;
}
}
}
public static class NowBean {
/**
* code : 101
* txt : 多云
*/
private CondBean cond;
private String fl;
private String hum;
private String pcpn;
private String pres;
private String tmp;
private String vis;
/**
* deg : 184
* dir : 西南风
* sc : 4-5
* spd : 24
*/
private WindBean wind;
public static NowBean objectFromData(String str) {
return new Gson().fromJson(str, NowBean.class);
}
public CondBean getCond() {
return cond;
}
public void setCond(CondBean cond) {
this.cond = cond;
}
public String getFl() {
return fl;
}
public void setFl(String fl) {
this.fl = fl;
}
public String getHum() {
return hum;
}
public void setHum(String hum) {
this.hum = hum;
}
public String getPcpn() {
return pcpn;
}
public void setPcpn(String pcpn) {
this.pcpn = pcpn;
}
public String getPres() {
return pres;
}
public void setPres(String pres) {
this.pres = pres;
}
public String getTmp() {
return tmp;
}
public void setTmp(String tmp) {
this.tmp = tmp;
}
public String getVis() {
return vis;
}
public void setVis(String vis) {
this.vis = vis;
}
public WindBean getWind() {
return wind;
}
public void setWind(WindBean wind) {
this.wind = wind;
}
public static class CondBean {
private String code;
private String txt;
public static CondBean objectFromData(String str) {
return new Gson().fromJson(str, CondBean.class);
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getTxt() {
return txt;
}
public void setTxt(String txt) {
this.txt = txt;
}
}
public static class WindBean {
private String deg;
private String dir;
private String sc;
private String spd;
public static WindBean objectFromData(String str) {
return new Gson().fromJson(str, WindBean.class);
}
public String getDeg() {
return deg;
}
public void setDeg(String deg) {
this.deg = deg;
}
public String getDir() {
return dir;
}
public void setDir(String dir) {
this.dir = dir;
}
public String getSc() {
return sc;
}
public void setSc(String sc) {
this.sc = sc;
}
public String getSpd() {
return spd;
}
public void setSpd(String spd) {
this.spd = spd;
}
}
}
public static class SuggestionBean {
/**
* brf : 舒适
* txt : 白天不太热也不太冷,风力不大,相信您在这样的天气条件下,应会感到比较清爽和舒适。
*/
private ComfBean comf;
/**
* brf : 较适宜
* txt : 较适宜洗车,未来一天无雨,风力较小,擦洗一新的汽车至少能保持一天。
*/
private CwBean cw;
/**
* brf : 较冷
* txt : 建议着厚外套加毛衣等服装。年老体弱者宜着大衣、呢外套加羊毛衫。
*/
private DrsgBean drsg;
/**
* brf : 较易发
* txt : 天气较凉,较易发生感冒,请适当增加衣服。体质较弱的朋友尤其应该注意防护。
*/
private FluBean flu;
/**
* brf : 较不宜
* txt : 天气较好,但考虑天气寒冷,推荐您进行各种室内运动,若在户外运动请注意保暖并做好准备活动。
*/
private SportBean sport;
/**
* brf : 适宜
* txt : 天气较好,但丝毫不会影响您出行的心情。温度适宜又有微风相伴,适宜旅游。
*/
private TravBean trav;
/**
* brf : 弱
* txt : 紫外线强度较弱,建议出门前涂擦SPF在12-15之间、PA+的防晒护肤品。
*/
private UvBean uv;
public static SuggestionBean objectFromData(String str) {
return new Gson().fromJson(str, SuggestionBean.class);
}
public ComfBean getComf() {
return comf;
}
public void setComf(ComfBean comf) {
this.comf = comf;
}
public CwBean getCw() {
return cw;
}
public void setCw(CwBean cw) {
this.cw = cw;
}
public DrsgBean getDrsg() {
return drsg;
}
public void setDrsg(DrsgBean drsg) {
this.drsg = drsg;
}
public FluBean getFlu() {
return flu;
}
public void setFlu(FluBean flu) {
this.flu = flu;
}
public SportBean getSport() {
return sport;
}
public void setSport(SportBean sport) {
this.sport = sport;
}
public TravBean getTrav() {
return trav;
}
public void setTrav(TravBean trav) {
this.trav = trav;
}
public UvBean getUv() {
return uv;
}
public void setUv(UvBean uv) {
this.uv = uv;
}
public static class ComfBean {
private String brf;
private String txt;
public static ComfBean objectFromData(String str) {
return new Gson().fromJson(str, ComfBean.class);
}
public String getBrf() {
return brf;
}
public void setBrf(String brf) {
this.brf = brf;
}
public String getTxt() {
return txt;
}
public void setTxt(String txt) {
this.txt = txt;
}
}
public static class CwBean {
private String brf;
private String txt;
public static CwBean objectFromData(String str) {
return new Gson().fromJson(str, CwBean.class);
}
public String getBrf() {
return brf;
}
public void setBrf(String brf) {
this.brf = brf;
}
public String getTxt() {
return txt;
}
public void setTxt(String txt) {
this.txt = txt;
}
}
public static class DrsgBean {
private String brf;
private String txt;
public static DrsgBean objectFromData(String str) {
return new Gson().fromJson(str, DrsgBean.class);
}
public String getBrf() {
return brf;
}
public void setBrf(String brf) {
this.brf = brf;
}
public String getTxt() {
return txt;
}
public void setTxt(String txt) {
this.txt = txt;
}
}
public static class FluBean {
private String brf;
private String txt;
public static FluBean objectFromData(String str) {
return new Gson().fromJson(str, FluBean.class);
}
public String getBrf() {
return brf;
}
public void setBrf(String brf) {
this.brf = brf;
}
public String getTxt() {
return txt;
}
public void setTxt(String txt) {
this.txt = txt;
}
}
public static class SportBean {
private String brf;
private String txt;
public static SportBean objectFromData(String str) {
return new Gson().fromJson(str, SportBean.class);
}
public String getBrf() {
return brf;
}
public void setBrf(String brf) {
this.brf = brf;
}
public String getTxt() {
return txt;
}
public void setTxt(String txt) {
this.txt = txt;
}
}
public static class TravBean {
private String brf;
private String txt;
public static TravBean objectFromData(String str) {
return new Gson().fromJson(str, TravBean.class);
}
public String getBrf() {
return brf;
}
public void setBrf(String brf) {
this.brf = brf;
}
public String getTxt() {
return txt;
}
public void setTxt(String txt) {
this.txt = txt;
}
}
public static class UvBean {
private String brf;
private String txt;
public static UvBean objectFromData(String str) {
return new Gson().fromJson(str, UvBean.class);
}
public String getBrf() {
return brf;
}
public void setBrf(String brf) {
this.brf = brf;
}
public String getTxt() {
return txt;
}
public void setTxt(String txt) {
this.txt = txt;
}
}
}
public static class DailyForecastBean {
/**
* sr : 06:33
* ss : 17:23
*/
private AstroBean astro;
/**
* code_d : 101
* code_n : 101
* txt_d : 多云
* txt_n : 多云
*/
private CondBean cond;
private String date;
private String hum;
private String pcpn;
private String pop;
private String pres;
/**
* max : 15
* min : 5
*/
private TmpBean tmp;
private String vis;
/**
* deg : 183
* dir : 无持续风向
* sc : 微风
* spd : 6
*/
private WindBean wind;
public static DailyForecastBean objectFromData(String str) {
return new Gson().fromJson(str, DailyForecastBean.class);
}
public AstroBean getAstro() {
return astro;
}
public void setAstro(AstroBean astro) {
this.astro = astro;
}
public CondBean getCond() {
return cond;
}
public void setCond(CondBean cond) {
this.cond = cond;
}
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
public String getHum() {
return hum;
}
public void setHum(String hum) {
this.hum = hum;
}
public String getPcpn() {
return pcpn;
}
public void setPcpn(String pcpn) {
this.pcpn = pcpn;
}
public String getPop() {
return pop;
}
public void setPop(String pop) {
this.pop = pop;
}
public String getPres() {
return pres;
}
public void setPres(String pres) {
this.pres = pres;
}
public TmpBean getTmp() {
return tmp;
}
public void setTmp(TmpBean tmp) {
this.tmp = tmp;
}
public String getVis() {
return vis;
}
public void setVis(String vis) {
this.vis = vis;
}
public WindBean getWind() {
return wind;
}
public void setWind(WindBean wind) {
this.wind = wind;
}
public static class AstroBean {
private String sr;
private String ss;
public static AstroBean objectFromData(String str) {
return new Gson().fromJson(str, AstroBean.class);
}
public String getSr() {
return sr;
}
public void setSr(String sr) {
this.sr = sr;
}
public String getSs() {
return ss;
}
public void setSs(String ss) {
this.ss = ss;
}
}
public static class CondBean {
private String code_d;
private String code_n;
private String txt_d;
private String txt_n;
public static CondBean objectFromData(String str) {
return new Gson().fromJson(str, CondBean.class);
}
public String getCode_d() {
return code_d;
}
public void setCode_d(String code_d) {
this.code_d = code_d;
}
public String getCode_n() {
return code_n;
}
public void setCode_n(String code_n) {
this.code_n = code_n;
}
public String getTxt_d() {
return txt_d;
}
public void setTxt_d(String txt_d) {
this.txt_d = txt_d;
}
public String getTxt_n() {
return txt_n;
}
public void setTxt_n(String txt_n) {
this.txt_n = txt_n;
}
}
public static class TmpBean {
private String max;
private String min;
public static TmpBean objectFromData(String str) {
return new Gson().fromJson(str, TmpBean.class);
}
public String getMax() {
return max;
}
public void setMax(String max) {
this.max = max;
}
public String getMin() {
return min;
}
public void setMin(String min) {
this.min = min;
}
}
public static class WindBean {
private String deg;
private String dir;
private String sc;
private String spd;
public static WindBean objectFromData(String str) {
return new Gson().fromJson(str, WindBean.class);
}
public String getDeg() {
return deg;
}
public void setDeg(String deg) {
this.deg = deg;
}
public String getDir() {
return dir;
}
public void setDir(String dir) {
this.dir = dir;
}
public String getSc() {
return sc;
}
public void setSc(String sc) {
this.sc = sc;
}
public String getSpd() {
return spd;
}
public void setSpd(String spd) {
this.spd = spd;
}
}
}
public static class HourlyForecastBean {
private String date;
private String hum;
private String pop;
private String pres;
private String tmp;
/**
* deg : 196
* dir : 西南风
* sc : 微风
* spd : 6
*/
private WindBean wind;
public static HourlyForecastBean objectFromData(String str) {
return new Gson().fromJson(str, HourlyForecastBean.class);
}
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
public String getHum() {
return hum;
}
public void setHum(String hum) {
this.hum = hum;
}
public String getPop() {
return pop;
}
public void setPop(String pop) {
this.pop = pop;
}
public String getPres() {
return pres;
}
public void setPres(String pres) {
this.pres = pres;
}
public String getTmp() {
return tmp;
}
public void setTmp(String tmp) {
this.tmp = tmp;
}
public WindBean getWind() {
return wind;
}
public void setWind(WindBean wind) {
this.wind = wind;
}
public static class WindBean {
private String deg;
private String dir;
private String sc;
private String spd;
public static WindBean objectFromData(String str) {
return new Gson().fromJson(str, WindBean.class);
}
public String getDeg() {
return deg;
}
public void setDeg(String deg) {
this.deg = deg;
}
public String getDir() {
return dir;
}
public void setDir(String dir) {
this.dir = dir;
}
public String getSc() {
return sc;
}
public void setSc(String sc) {
this.sc = sc;
}
public String getSpd() {
return spd;
}
public void setSpd(String spd) {
this.spd = spd;
}
}
}
}
}
作者:lw_zhaoritian 发表于2016/10/23 18:01:21
原文链接