JSON Parsing Demo
This example is a little more advanced - many sites will have API's that give you JSON
data. We will build on the previous SSL example to connect to twitter and get that
JSON data chunk
Then we'll useArduinoJSON()to convert that to a format we can use and then
display that data on the serial port (which can then be re-directed to a display of some
sort)
First up,use the Library manager to install ArduinoJSON().
Then load the exampleJSONdemoby copying the code below and pasting it into
your Arduino IDE.
// SPDX-FileCopyrightText: 2014 Benoit Blanchon
// SPDX-FileCopyrightText: 2014 Arturo Guadalupi
// SPDX-FileCopyrightText: 2020 Brent Rubell for Adafruit Industries
//
// SPDX-License-Identifier: MIT
/*
This example creates a client object that connects and transfers
data using always SSL, then shows how to parse a JSON document in an HTTP response.
It is compatible with the methods normally related to plain
connections, like client.connect(host, port).
©Adafruit Industries Page 218 of 263