Không có mô tả

Benoit Blanchon 4d7f03836c Added a test that removes an element during iteration (#1332) 5 năm trước cách đây
.github 27ec1afb7a Configure the "lock-threads" app 6 năm trước cách đây
examples d8724e0a0b Changed the array subscript to automatically add missing elements 6 năm trước cách đây
extras 4d7f03836c Added a test that removes an element during iteration (#1332) 5 năm trước cách đây
src c63eb80b95 Shortened the name of the private namespace using hexadecimal digits 5 năm trước cách đây
.clang-format 0814fc185f Added a line-break after each "if" to get more accurate coverage report 6 năm trước cách đây
.gitattributes e31d667bec Added support of comments in JSON input (issue #88) 10 năm trước cách đây
.gitignore b47ac27ac6 Moved ancillary files to `extras/` (fixes #1011) 6 năm trước cách đây
.mbedignore 3fd87e8e82 Added fuzzing/ to .mbedignore 9 năm trước cách đây
.travis.yml 8ef226bcb8 Travis: Added Clang 9. Removed Xcode 7.3 5 năm trước cách đây
ArduinoJson.h f9cfea244a Updated copyright notice 6 năm trước cách đây
CHANGELOG.md 0c0bf80074 Suppress IAR compiler warning. 5 năm trước cách đây
CMakeLists.txt 63606c0985 Added json_fuzzer and msgpack_fuzzer in test suite 5 năm trước cách đây
CONTRIBUTING.md 6df204cf40 Split CONTRIBUTING and SUPPORT 8 năm trước cách đây
LICENSE.md fd79d23910 Updated copyright year 6 năm trước cách đây
README.md 764ff2cd53 Added string deduplication (closes #1303) 5 năm trước cách đây
SUPPORT.md fbfdca1de9 Added campaign information in links 8 năm trước cách đây
appveyor.yml 6fb52c3638 Set version to 6.15.2 5 năm trước cách đây
banner.svg d6e61cbcda Added banner with the new logo 8 năm trước cách đây
component.mk b261eca865 esp-idf make system 6 năm trước cách đây
keywords.txt 06a0d1a872 Added measureJson, measureJsonPretty, and measureMsgPack to keywords 6 năm trước cách đây
library.json 6fb52c3638 Set version to 6.15.2 5 năm trước cách đây
library.properties 6fb52c3638 Set version to 6.15.2 5 năm trước cách đây

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.