Multiple Day Forecast API

This is an example of a slightly more involved JSON object. This chunk of data, for what to expect for several future date’s weather, is “structured data” that is passed from a source (like the National Weather Service) to recipients like you and me when we want to check on the weather forecast (for more than just one day) from our cell phone.

Here is the JSON object:

{
"longitude": 47.60,
"latitude": 122.33,
"forecasts": [
{
"date": "2015-09-01",
"description": "sunny",
"maxTemp": 22,
"minTemp": 20,
"windSpeed": 12,
"danger": false
},
{
"date": "2015-09-02",
"description": "overcast",
"maxTemp": 21,
"minTemp": 17,
"windSpeed": 15,
"danger": false
},
{
"date": "2015-09-03",
"description": "raining",
"maxTemp": 20,
"minTemp": 18,
"windSpeed": 13,
"danger": false
}
]
}

In this object there is specified a particular location by longitude and latitude coordinates, and the range of days for the forecast is an array (or list) of dates and the forecast for each. Here’s the corresponding documentation:

Leave a Reply

Your email address will not be published. Required fields are marked *