Bez popisu

Benoit Blanchon 1038fc35df Removed DeserializationError::NotSupported před 5 roky
.github 769e8440f5 CI: skip Particle job for Pull Requests před 5 roky
examples c72eccdd35 Added missing calls to client.stop() in JsonHttpClient.ino (fixes #1485) před 5 roky
extras 1038fc35df Removed DeserializationError::NotSupported před 5 roky
src 1038fc35df Removed DeserializationError::NotSupported před 5 roky
.clang-format 0814fc185f Added a line-break after each "if" to get more accurate coverage report před 6 roky
.gitattributes e31d667bec Added support of comments in JSON input (issue #88) před 10 roky
.gitignore aa7cc5351c Travis: added smoke test for Particle Argon před 5 roky
.mbedignore 3fd87e8e82 Added fuzzing/ to .mbedignore před 9 roky
ArduinoJson.h 97b7161d78 Update copyright notice for 2021 před 5 roky
CHANGELOG.md 1038fc35df Removed DeserializationError::NotSupported před 5 roky
CMakeLists.txt e22d4bf31f Set version to 6.17.3 před 5 roky
CONTRIBUTING.md 3975b07371 Moved CI from Travis to GitHub Actions (fixes #1493) před 5 roky
LICENSE.md 97b7161d78 Update copyright notice for 2021 před 5 roky
README.md e22d4bf31f Set version to 6.17.3 před 5 roky
SUPPORT.md fbfdca1de9 Added campaign information in links před 8 roky
appveyor.yml e22d4bf31f Set version to 6.17.3 před 5 roky
banner.svg d6e61cbcda Added banner with the new logo před 8 roky
component.mk b261eca865 esp-idf make system před 6 roky
keywords.txt 6b26cd0977 Add JsonDocument to keywords.txt před 5 roky
library.json e22d4bf31f Set version to 6.17.3 před 5 roky
library.properties e22d4bf31f Set version to 6.17.3 před 5 roky

README.md

ArduinoJson


arduino-library-badge Continuous Integration Continuous Integration Fuzzing Status Coverage Status GitHub stars

ArduinoJson is a C++ JSON library for Arduino and IoT (Internet Of Things).

Features

Quickstart

Deserialization

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

Serialization

Here is a program that generates a JSON document with ArduinoJson:

DynamicJsonDocument doc(1024);

doc["sensor"] = "gps";
doc["time"]   = 1351824120;
doc["data"][0] = 48.756080;
doc["data"][1] = 2.302038;

serializeJson(doc, Serial);
// This prints:
// {"sensor":"gps","time":1351824120,"data":[48.756080,2.302038]}

See the tutorial on arduinojson.org

Support the project

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.