Bez popisu

Benoit Blanchon b0730f04f7 Rename `VariantRef` to `JsonVariant` před 3 roky
.github 208a22e324 Update GitHub action `dessant/lock-threads` před 3 roky
.vscode cde8cd50f8 VSCode: configure include path před 3 roky
examples f73be9cf0f Fix typo. před 3 roky
extras b0730f04f7 Rename `VariantRef` to `JsonVariant` před 3 roky
src b0730f04f7 Rename `VariantRef` to `JsonVariant` před 3 roky
.clang-format 8002722f3b Clang-format: set `DerivePointerAlignment` to `false` před 3 roky
.gitattributes e31d667bec Added support of comments in JSON input (issue #88) před 10 roky
.gitignore 055304bf01 Ignore Visual Studio's `/out/` folder před 4 roky
.mbedignore 803e07c188 Updated folders list in `.mbedignore` (closes #1515) před 4 roky
.prettierignore 506cf7f438 Added .prettierignore před 4 roky
ArduinoJson.h af18994deb Update copyright notice před 4 roky
CHANGELOG.md 0f85a55cac Implement `VariantRefBase` with a CRTP před 3 roky
CMakeLists.txt 67b6797b6d Set version to 6.19.4 před 3 roky
CONTRIBUTING.md 3975b07371 Moved CI from Travis to GitHub Actions (fixes #1493) před 5 roky
LICENSE.md af18994deb Update copyright notice před 4 roky
README.md 9afae963e8 Update tutorial links to point to version 6 před 3 roky
SUPPORT.md fbfdca1de9 Added campaign information in links před 8 roky
appveyor.yml 67b6797b6d Set version to 6.19.4 před 3 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 67b6797b6d Set version to 6.19.4 před 3 roky
library.properties 67b6797b6d Set version to 6.19.4 před 3 roky
logo.svg abfcac4674 README: bigger logo on mobile před 3 roky

README.md

ArduinoJson


GitHub Workflow Status Continuous Integration Fuzzing Status Coveralls branch
Arduino Library Manager PlatformIO Registry GitHub stars GitHub Sponsors

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

Sponsors

ArduinoJson is thankful to its sponsors. Please give them a visit; they deserve it!

Programming Electronics Academy

1technophile

If you run a commercial project that embeds ArduinoJson, think about sponsoring the library's development: it ensures the code that your products rely on stays actively maintained. It can also give your project some exposure to the makers' community.

If you are an individual user and want to support the development (or give a sign of appreciation), consider purchasing the book Mastering ArduinoJson ❤, or simply cast a star ⭐.