You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
TitoChan 5dc111c7bb
gengxin
1 year ago
..
extras gengxin 1 year ago
src gengxin 1 year ago
.clang-format gengxin 1 year ago
.gitattributes gengxin 1 year ago
.gitignore gengxin 1 year ago
.mbedignore gengxin 1 year ago
.prettierignore gengxin 1 year ago
ArduinoJson.h gengxin 1 year ago
CHANGELOG.md gengxin 1 year ago
CMakeLists.txt gengxin 1 year ago
CONTRIBUTING.md gengxin 1 year ago
LICENSE.md gengxin 1 year ago
README.md gengxin 1 year ago
SUPPORT.md gengxin 1 year ago
appveyor.yml gengxin 1 year ago
banner.svg gengxin 1 year ago
component.mk gengxin 1 year ago
keywords.txt gengxin 1 year ago
library.json gengxin 1 year ago
library.properties gengxin 1 year ago

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.