We are about to switch to a new forum software. Until then we have removed the registration on this forum.
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
https://Forum.Processing.org/two/discussion/15473/how-to-format-code-and-text
http://API.OpenWeatherMap.org/data/2.5/forecast?id=5368361&&cnt=1&APPID=9972f563fbd40a4148b0b962bc535833
Thank you!