No Description

Benoit Blanchon bcdf5b7e52 Set version to 6.17.1 5 years ago
.github 27ec1afb7a Configure the "lock-threads" app 6 years ago
examples c4ec2ba88f Added `DeserializationError::f_str()` (issue #846) 5 years ago
extras 10ec0f21b0 Fixed `operator|(MemberProxy, JsonObject)` (fixes #1415) 5 years ago
src bcdf5b7e52 Set version to 6.17.1 5 years ago
.clang-format 0814fc185f Added a line-break after each "if" to get more accurate coverage report 6 years ago
.gitattributes e31d667bec Added support of comments in JSON input (issue #88) 10 years ago
.gitignore b47ac27ac6 Moved ancillary files to `extras/` (fixes #1011) 6 years ago
.mbedignore 3fd87e8e82 Added fuzzing/ to .mbedignore 9 years ago
.travis.yml 8993a093e9 Travis: run sanitizer on recent GCC version to avoid false positives 5 years ago
ArduinoJson.h f9cfea244a Updated copyright notice 6 years ago
CHANGELOG.md bcdf5b7e52 Set version to 6.17.1 5 years ago
CMakeLists.txt bcdf5b7e52 Set version to 6.17.1 5 years ago
CONTRIBUTING.md 6df204cf40 Split CONTRIBUTING and SUPPORT 8 years ago
LICENSE.md fd79d23910 Updated copyright year 6 years ago
README.md bcdf5b7e52 Set version to 6.17.1 5 years ago
SUPPORT.md fbfdca1de9 Added campaign information in links 8 years ago
appveyor.yml bcdf5b7e52 Set version to 6.17.1 5 years ago
banner.svg d6e61cbcda Added banner with the new logo 8 years ago
component.mk b261eca865 esp-idf make system 6 years ago
keywords.txt 6b26cd0977 Add JsonDocument to keywords.txt 5 years ago
library.json bcdf5b7e52 Set version to 6.17.1 5 years ago
library.properties bcdf5b7e52 Set version to 6.17.1 5 years ago

README.md

ArduinoJson


arduino-library-badge Build Status Build Status 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.