FloKra d9e47579fd 0.5.0 2020-01-09 | 4 years ago | |
---|---|---|
.. | ||
.github | 4 years ago | |
examples | 4 years ago | |
extras | 4 years ago | |
src | 4 years ago | |
.clang-format | 4 years ago | |
.gitattributes | 4 years ago | |
.gitignore | 4 years ago | |
.mbedignore | 4 years ago | |
.travis.yml | 4 years ago | |
ArduinoJson.h | 4 years ago | |
CHANGELOG.md | 4 years ago | |
CMakeLists.txt | 4 years ago | |
CONTRIBUTING.md | 4 years ago | |
LICENSE.md | 4 years ago | |
README.md | 4 years ago | |
SUPPORT.md | 4 years ago | |
appveyor.yml | 4 years ago | |
banner.svg | 4 years ago | |
component.mk | 4 years ago | |
keywords.txt | 4 years ago | |
library.json | 4 years ago | |
library.properties | 4 years ago |
ArduinoJson is a C++ JSON library for Arduino and IoT (Internet Of Things).
ArduinoJson works on the following hardware:
ArduinoJson compiles with zero warning on the following compilers, IDEs, and platforms:
Here is a program that parses a JSON document with ArduinoJson.
char json[] = "{\"sensor\":\"gps\",\"time\":1351824120,\"data\":[48.756080,2.302038]}";
DynamicJsonDocument doc(1024);
deserializeJson(doc, json);
const char* sensor = doc["sensor"];
long time = doc["time"];
double latitude = doc["data"][0];
double longitude = doc["data"][1];
See the tutorial on arduinojson.org
Here is a program that generates a JSON document with ArduinoJson:
DynamicJsonDocument doc(1024);
doc["sensor"] = "gps";
doc["time"] = 1351824120;
JsonArray data = doc.createNestedArray("data");
data.add(48.756080);
data.add(2.302038);
serializeJson(doc, Serial);
// This prints:
// {"sensor":"gps","time":1351824120,"data":[48.756080,2.302038]}
See the tutorial on arduinojson.org
The documentation is available on arduinojson.org, here are some shortcuts:
Do you like this library? Please star this project on GitHub!
What? You don't like it but you love it? We don't take donations anymore, but we sell a book, so you can help and learn at the same time!