LightTracker-1.0/libraries/ArduinoJson-6.x
lightaprs 17292d46b6 initial commit 2021-10-11 13:59:09 +03:00
..
.devcontainer initial commit 2021-10-11 13:59:09 +03:00
.github initial commit 2021-10-11 13:59:09 +03:00
.vscode initial commit 2021-10-11 13:59:09 +03:00
examples initial commit 2021-10-11 13:59:09 +03:00
extras initial commit 2021-10-11 13:59:09 +03:00
src initial commit 2021-10-11 13:59:09 +03:00
.clang-format initial commit 2021-10-11 13:59:09 +03:00
.gitattributes initial commit 2021-10-11 13:59:09 +03:00
.gitignore initial commit 2021-10-11 13:59:09 +03:00
.mbedignore initial commit 2021-10-11 13:59:09 +03:00
.prettierignore initial commit 2021-10-11 13:59:09 +03:00
ArduinoJson.h initial commit 2021-10-11 13:59:09 +03:00
CHANGELOG.md initial commit 2021-10-11 13:59:09 +03:00
CMakeLists.txt initial commit 2021-10-11 13:59:09 +03:00
CONTRIBUTING.md initial commit 2021-10-11 13:59:09 +03:00
LICENSE.md initial commit 2021-10-11 13:59:09 +03:00
README.md initial commit 2021-10-11 13:59:09 +03:00
SUPPORT.md initial commit 2021-10-11 13:59:09 +03:00
appveyor.yml initial commit 2021-10-11 13:59:09 +03:00
banner.svg initial commit 2021-10-11 13:59:09 +03:00
component.mk initial commit 2021-10-11 13:59:09 +03:00
keywords.txt initial commit 2021-10-11 13:59:09 +03:00
library.json initial commit 2021-10-11 13:59:09 +03:00
library.properties initial commit 2021-10-11 13:59:09 +03:00

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?
You can support the project by purchasing my book. Alternatively, you can make a recurring donation via GitHub Sponsors.