Benoit et al:
I am trying to use this library, it looks cool and it is well documented.
It works for me on plain JSON strings, however I wonder how to use it on nested objects (curly braces inside curly braces), it parses ok, at least no errors, however I wonder how to get an object inside another objects.
In the below example, I need to get the temp, pressure and humidity.
See this example:
output from: http://api.openweathermap.org/data/2.5/weather?id=3117735
The ArduinoJson pretty print output is:
{
"coord": {
"lon": -3.7,
"lat": 40.42
},
"sys": {
"message": 0.0401,
"country": "ES",
"sunrise": 1420789051,
"sunset": 1420823192
},
"weather": [
{
"id": 800,
"main": "Clear",
"description": "Sky is Clear",
"icon": "01d"
}
],
"base": "cmc stations",
"main": {
"temp": 271.744,
"temp_min": 271.744,
"temp_max": 271.744,
"pressure": 980.94,
"sea_level": 1058.7,
"grnd_level": 980.94,
"humidity": 71
},
"wind": {
"speed": 1.51,
"deg": 20.5025
},
"clouds": {
"all": 0
},
"dt": 1420797371,
"id": 3117735,
"name": "Madrid",
"cod": 200
}
and the ArduinoJson iteration of value key pairs is:
coord =>
sys =>
weather =>
base => cmc stations
main =>
wind =>
clouds =>
dt =>
id =>
name => Madrid
cod =>
sys.sunrise =>
sunset =>
pressure =>
humidity =>
Thanks in advance for your help.
AC/.