بروز خطا
[message]
اشتراک در سوال
رای ها
[dataList]
مشکل در ساخت MVC
سلام دوستان
من یک قالب JSON دارم که براش یک Model View Controler نوشتم ولی یه جاهایی مشکل داره و من نمی دونم چیه ! منظورمم از این که می گم مشکل داره از لحاظ کد نویسی نیستش از این لحاظ مشکل داره که ساختار درستی برای JSON ننوشتم احتمالا
این کلاس MVC من هستش ، که در اصل همون قالبی هستش که برای JSON نوشتم :
public class WeatherModel {
private double mainList;
private String weatherList;
private double windList;
/********** main ***************/
public static class main{
private double temp;
public double getTemp() {
return temp;
}
public void setTemp(double temp) {
this.temp = temp;
}
private double pressure;
public double getPressure() {
return pressure;
}
public void setPressure(double pressure) {
this.pressure = pressure;
}
private double humidity;
public double getHumidity() {
return humidity;
}
public void setHumidity(double humidity) {
this.humidity = humidity;
}
}
/********** weather ***************/
public static class weather{
private String main;
public String getMain() {
return main;
}
public void setMain(String main) {
this.main = main;
}
}
/********** wind ***************/
public static class wind{
private double speed;
public double getSpeed() {
return speed;
}
public void setSpeed(double speed) {
this.speed = speed;
}
}
/**********date and time***************/
private String dt_txt;
public String getDt_txt() {
return dt_txt;
}
public void setDt_txt(String dt_txt) {
this.dt_txt = dt_txt;
}
/********** getter and setter for Lists ************/
public double getMainList() {
return mainList;
}
public void setMainList(double mainList) {
this.mainList = mainList;
}
public String getWeatherList() {
return weatherList;
}
public void setWeatherList(String weatherList) {
this.weatherList = weatherList;
}
public double getWindList() {
return windList;
}
public void setWindList(double windList) {
this.windList = windList;
}
}
و اینم قالب JSON من هستش که MVC بالا رو برای این JSON نوشتم :
فقط اونایی که زرد کردم و میخوام :)
دوستان لطفا کمک کنید دارم دیونه میشم از دست این یه هفته دنبال اینم
ممنون
برای این سوال پاسخی وجود ندارد.
پاسخگویی و مشاهده پاسخ های این سوال تنها برای اعضای ویژه سایت امکان پذیر است .
چنانچه تمایل دارید به همه بخش ها دسترسی داشته باشید میتوانید از این بخش لایسنس این آموزش را خریداری نمایید .