|
|
4 yıl önce | |
|---|---|---|
| .devcontainer | 4 yıl önce | |
| .github | 4 yıl önce | |
| .vscode | 4 yıl önce | |
| examples | 4 yıl önce | |
| extras | 4 yıl önce | |
| src | 4 yıl önce | |
| .clang-format | 4 yıl önce | |
| .gitattributes | 10 yıl önce | |
| .gitignore | 5 yıl önce | |
| .mbedignore | 4 yıl önce | |
| .prettierignore | 4 yıl önce | |
| ArduinoJson.h | 4 yıl önce | |
| CHANGELOG.md | 4 yıl önce | |
| CMakeLists.txt | 4 yıl önce | |
| CONTRIBUTING.md | 5 yıl önce | |
| LICENSE.md | 5 yıl önce | |
| README.md | 4 yıl önce | |
| SUPPORT.md | 8 yıl önce | |
| appveyor.yml | 4 yıl önce | |
| banner.svg | 8 yıl önce | |
| component.mk | 6 yıl önce | |
| keywords.txt | 5 yıl önce | |
| library.json | 4 yıl önce | |
| library.properties | 4 yıl önce |
ArduinoJson is a C++ JSON library for Arduino and IoT (Internet Of Things).
String, std::string and std::string_viewStream and std::istream/std::ostream-Wall -Wextra -pedantic and /W4const friendlyfor friendlyHere 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
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
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.