|
|
2 лет назад | |
|---|---|---|
| .github | 8 лет назад | |
| examples | 7 лет назад | |
| fuzzing | 7 лет назад | |
| scripts | 6 лет назад | |
| src | 2 лет назад | |
| test | 2 лет назад | |
| third-party | 7 лет назад | |
| .clang-format | 9 лет назад | |
| .gitattributes | 10 лет назад | |
| .gitignore | 9 лет назад | |
| .mbedignore | 9 лет назад | |
| .travis.yml | 7 лет назад | |
| ArduinoJson.h | 7 лет назад | |
| CHANGELOG.md | 2 лет назад | |
| CMakeLists.txt | 7 лет назад | |
| CONTRIBUTING.md | 8 лет назад | |
| LICENSE.md | 7 лет назад | |
| README.md | 6 лет назад | |
| SUPPORT.md | 8 лет назад | |
| appveyor.yml | 6 лет назад | |
| banner.svg | 8 лет назад | |
| keywords.txt | 9 лет назад | |
| library.json | 6 лет назад | |
| library.properties | 6 лет назад |
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]}";
StaticJsonBuffer<200> jsonBuffer;
JsonObject& root = jsonBuffer.parseObject(json);
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:
StaticJsonBuffer<200> jsonBuffer;
JsonObject& root = jsonBuffer.createObject();
root["sensor"] = "gps";
root["time"] = 1351824120;
JsonArray& data = root.createNestedArray("data");
data.add(48.756080);
data.add(2.302038);
root.printTo(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!