I'm relatively new to Android and I'm trying to parse some data and I seem to be getting the following error in LogCat:
Unexpected value from nativeGetEnabledTags: 0
Error parsing data org.json.JSONException
I'm getting my JSON data from: http://api.wunderground.com/api/180dde448747af27/forecast/q/UK/Bradford.json
I'm using the following code to pull out data:
JSONArray forecasts = json.getJSONArray("forecast");
for (int i=0;i<forecasts.length();i++) {
HashMap<String, String> map = new HashMap<String, String>();
JSONObject e = forecasts.getJSONObject(i);
// simpleforecast is a json array
JSONArray forecastday = json.getJSONArray("forecastday");
JSONObject fd = forecastday.getJSONObject(i);
String icon = fd.getString("icon");
map.put("id", String.valueOf(i));
map.put("icon", icon);
mylist.add(map);
}
I believe the error is something to do with my JSON pulling, I've probably not parsed it correctly, but I can't seem to find the correct way to get it out. This code is surrounded by a try-catch and then I've got a list adapter that I add the code to.
Apologies if I've missed anything but I'm fairly confident this is sufficient as I believe this is where the error is coming from.

forecastisn't an array, usegetJSONObjectinstead.