Tidak Ada Deskripsi

Benoit Blanchon 300323cfd7 Improved coverage of JsonArray 6 tahun lalu
.github 27ec1afb7a Configure the "lock-threads" app 6 tahun lalu
examples d8724e0a0b Changed the array subscript to automatically add missing elements 6 tahun lalu
extras 300323cfd7 Improved coverage of JsonArray 6 tahun lalu
src d8724e0a0b Changed the array subscript to automatically add missing elements 6 tahun lalu
.clang-format 0814fc185f Added a line-break after each "if" to get more accurate coverage report 6 tahun lalu
.gitattributes e31d667bec Added support of comments in JSON input (issue #88) 10 tahun lalu
.gitignore b47ac27ac6 Moved ancillary files to `extras/` (fixes #1011) 6 tahun lalu
.mbedignore 3fd87e8e82 Added fuzzing/ to .mbedignore 9 tahun lalu
.travis.yml d2a67f362f Fixed "deprecated-copy" warning on GCC 9 (fixes #1184) 6 tahun lalu
ArduinoJson.h f9cfea244a Updated copyright notice 6 tahun lalu
CHANGELOG.md d8724e0a0b Changed the array subscript to automatically add missing elements 6 tahun lalu
CMakeLists.txt f9cfea244a Updated copyright notice 6 tahun lalu
CONTRIBUTING.md 6df204cf40 Split CONTRIBUTING and SUPPORT 8 tahun lalu
LICENSE.md fd79d23910 Updated copyright year 6 tahun lalu
README.md 66b12da4e7 Added `DeserializationOption::Filter` (closes #959) 6 tahun lalu
SUPPORT.md fbfdca1de9 Added campaign information in links 8 tahun lalu
appveyor.yml 42b0d6a83d Set version to 6.14.1 6 tahun lalu
banner.svg d6e61cbcda Added banner with the new logo 8 tahun lalu
component.mk b261eca865 esp-idf make system 6 tahun lalu
keywords.txt 06a0d1a872 Added measureJson, measureJsonPretty, and measureMsgPack to keywords 6 tahun lalu
library.json 42b0d6a83d Set version to 6.14.1 6 tahun lalu
library.properties 42b0d6a83d Set version to 6.14.1 6 tahun lalu

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;

JsonArray data = doc.createNestedArray("data");
data.add(48.756080);
data.add(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!