Bez popisu

Benoit Blanchon d02ce2f1bb Gathered the tests of ElementProxy in one file před 5 roky
.github 27ec1afb7a Configure the "lock-threads" app před 6 roky
examples c4ec2ba88f Added `DeserializationError::f_str()` (issue #846) před 5 roky
extras d02ce2f1bb Gathered the tests of ElementProxy in one file před 5 roky
src 2664a2d0da Fixed error "ambiguous overload for operator|" (fixes #1411) 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 b47ac27ac6 Moved ancillary files to `extras/` (fixes #1011) před 6 roky
.mbedignore 3fd87e8e82 Added fuzzing/ to .mbedignore před 9 roky
.travis.yml 8993a093e9 Travis: run sanitizer on recent GCC version to avoid false positives před 5 roky
ArduinoJson.h f9cfea244a Updated copyright notice před 6 roky
CHANGELOG.md 2664a2d0da Fixed error "ambiguous overload for operator|" (fixes #1411) před 5 roky
CMakeLists.txt 1f7350658e Set version to 6.17.0 před 5 roky
CONTRIBUTING.md 6df204cf40 Split CONTRIBUTING and SUPPORT před 8 roky
LICENSE.md fd79d23910 Updated copyright year před 6 roky
README.md 1f7350658e Set version to 6.17.0 před 5 roky
SUPPORT.md fbfdca1de9 Added campaign information in links před 8 roky
appveyor.yml 1f7350658e Set version to 6.17.0 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 06a0d1a872 Added measureJson, measureJsonPretty, and measureMsgPack to keywords před 6 roky
library.json 1f7350658e Set version to 6.17.0 před 5 roky
library.properties 1f7350658e Set version to 6.17.0 před 5 roky

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.