"JSON object is not a number"

Any idea why this returns "JSON object ["temp_max"]is not a number"?

JSONObject losAngelesWeather;

void setup() { size(480, 320);

} void draw() {

String weatherLA_URL = "http://api.openweathermap.org/data/2.5/forecast?id=5368361&&cnt=1&APPID= 9972f563fbd40a4148b0b962bc535833"; losAngelesWeather = loadJSONObject(weatherLA_URL);

float temp = losAngelesWeather.getJSONArray("list").getJSONObject(0).getFloat("temp_max");

println(temp); }

Answers

Sign In or Register to comment.