慢慢喜欢
private List list=new ArrayList<>();
private void parseJSONWithJSONObject(String jsonData) {
try {
JSONObject jsonObject = new JSONObject(jsonData);
JSONObject result = jsonObject.getJSONObject("result");
JSONArray jsonArrayWeather=result.getJSONArray("future");
for(int i=0;i
JSONObject Object =(JSONObject) jsonArrayWeather.get(i);
String temperature = Object.getString("temperature");
String weather = Object.getString("weather");
String wind = Object.getString("wind");
String week = Object.getString("week");
String date = Object.getString("date");
WeatherBean weatherBean=new WeatherBean(temperature,weather,wind,week,date);
list.add(weatherBean);
}
} catch (Exception e) {
e.printStackTrace();
}
}
我这样解析数组并且想显示到listview中为什么一直不能成功,listview中都是空白的
回复
2016-12-14