diff options
| author | krolyxon <me@krolyxon.com> | 2026-06-08 23:12:15 +0530 |
|---|---|---|
| committer | krolyxon <me@krolyxon.com> | 2026-06-08 23:12:15 +0530 |
| commit | 8a4d103196312b8a18afc0a2ba0fc13ff1a0b180 (patch) | |
| tree | a92424ac65fbdb93702ea8c44a5c52c9fd66e28c /.pio/libdeps/esp32-s3-n16r8/ArduinoJson/examples/JsonParserExample | |
| parent | 1d557527be495c59bbc07f194d903b1cec1780d3 (diff) | |
remove .pio
Diffstat (limited to '.pio/libdeps/esp32-s3-n16r8/ArduinoJson/examples/JsonParserExample')
| -rw-r--r-- | .pio/libdeps/esp32-s3-n16r8/ArduinoJson/examples/JsonParserExample/JsonParserExample.ino | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/.pio/libdeps/esp32-s3-n16r8/ArduinoJson/examples/JsonParserExample/JsonParserExample.ino b/.pio/libdeps/esp32-s3-n16r8/ArduinoJson/examples/JsonParserExample/JsonParserExample.ino deleted file mode 100644 index b7aa6b7..0000000 --- a/.pio/libdeps/esp32-s3-n16r8/ArduinoJson/examples/JsonParserExample/JsonParserExample.ino +++ /dev/null @@ -1,65 +0,0 @@ -// ArduinoJson - https://arduinojson.org
-// Copyright © 2014-2026, Benoit BLANCHON
-// MIT License
-//
-// This example shows how to deserialize a JSON document with ArduinoJson.
-//
-// https://arduinojson.org/v7/example/parser/
-
-#include <ArduinoJson.h>
-
-void setup() {
- // Initialize serial port
- Serial.begin(9600);
- while (!Serial)
- continue;
-
- // Allocate the JSON document
- JsonDocument doc;
-
- // JSON input string.
- const char* json =
- "{\"sensor\":\"gps\",\"time\":1351824120,\"data\":[48.756080,2.302038]}";
-
- // Deserialize the JSON document
- DeserializationError error = deserializeJson(doc, json);
-
- // Test if parsing succeeds
- if (error) {
- Serial.print(F("deserializeJson() failed: "));
- Serial.println(error.f_str());
- return;
- }
-
- // Fetch the values
- //
- // Most of the time, you can rely on the implicit casts.
- // In other case, you can do doc["time"].as<long>();
- const char* sensor = doc["sensor"];
- long time = doc["time"];
- double latitude = doc["data"][0];
- double longitude = doc["data"][1];
-
- // Print the values
- Serial.println(sensor);
- Serial.println(time);
- Serial.println(latitude, 6);
- Serial.println(longitude, 6);
-}
-
-void loop() {
- // not used in this example
-}
-
-// See also
-// --------
-//
-// https://arduinojson.org/ contains the documentation for all the functions
-// used above. It also includes an FAQ that will help you solve any
-// deserialization problem.
-//
-// The book "Mastering ArduinoJson" contains a tutorial on deserialization.
-// It begins with a simple example, like the one above, and then adds more
-// features like deserializing directly from a file or an HTTP request.
-// Learn more at https://arduinojson.org/book/
-// Use the coupon code TWENTY for a 20% discount ❤❤❤❤❤
|
