|
|
7 ani în urmă | |
|---|---|---|
| .github | 8 ani în urmă | |
| examples | 7 ani în urmă | |
| fuzzing | 7 ani în urmă | |
| scripts | 7 ani în urmă | |
| src | 7 ani în urmă | |
| test | 7 ani în urmă | |
| third-party | 8 ani în urmă | |
| .clang-format | 9 ani în urmă | |
| .gitattributes | 10 ani în urmă | |
| .gitignore | 7 ani în urmă | |
| .mbedignore | 9 ani în urmă | |
| .travis.yml | 7 ani în urmă | |
| ArduinoJson.h | 8 ani în urmă | |
| CHANGELOG.md | 7 ani în urmă | |
| CMakeLists.txt | 7 ani în urmă | |
| CONTRIBUTING.md | 8 ani în urmă | |
| LICENSE.md | 8 ani în urmă | |
| README.md | 7 ani în urmă | |
| SUPPORT.md | 8 ani în urmă | |
| appveyor.yml | 7 ani în urmă | |
| banner.svg | 8 ani în urmă | |
| keywords.txt | 7 ani în urmă | |
| library.json | 7 ani în urmă | |
| library.properties | 7 ani în urmă |
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;
deserializeJson(doc, json);
JsonObjectRef root = doc.as<JsonObject>();
const char* sensor = root["sensor"];
long time = root["time"];
double latitude = root["data"][0];
double longitude = root["data"][1];
See the tutorial on arduinojson.org
Here is a program that generates a JSON document with ArduinoJson:
DynamicJsonDocument doc;
JsonObject root = doc.to<JsonObject>();
root["sensor"] = "gps";
root["time"] = 1351824120;
JsonArray data = root.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!