diff --git a/examples/JsonConfigFile/JsonConfigFile.ino b/examples/JsonConfigFile/JsonConfigFile.ino index fa243c83..c3c3bdfc 100644 --- a/examples/JsonConfigFile/JsonConfigFile.ino +++ b/examples/JsonConfigFile/JsonConfigFile.ino @@ -24,11 +24,6 @@ #include // Our configuration structure. -// -// Never use a JsonDocument to store the configuration! -// A JsonDocument is *not* a permanent storage; it's only a temporary storage -// used during the serialization phase. See: -// https://arduinojson.org/v6/faq/why-must-i-create-a-separate-config-object/ struct Config { char hostname[64]; int port; @@ -43,8 +38,6 @@ void loadConfiguration(const char* filename, Config& config) { File file = SD.open(filename); // Allocate a temporary JsonDocument - // Don't forget to change the capacity to match your requirements. - // Use https://arduinojson.org/v6/assistant to compute the capacity. JsonDocument doc; // Deserialize the JSON document @@ -75,8 +68,6 @@ void saveConfiguration(const char* filename, const Config& config) { } // Allocate a temporary JsonDocument - // Don't forget to change the capacity to match your requirements. - // Use https://arduinojson.org/assistant to compute the capacity. JsonDocument doc; // Set the values in the document diff --git a/examples/JsonGeneratorExample/JsonGeneratorExample.ino b/examples/JsonGeneratorExample/JsonGeneratorExample.ino index cc0a2ed8..f5e1ce86 100644 --- a/examples/JsonGeneratorExample/JsonGeneratorExample.ino +++ b/examples/JsonGeneratorExample/JsonGeneratorExample.ino @@ -15,25 +15,18 @@ void setup() { continue; // Allocate the JSON document - // - // Inside the parentheses, 200 is the RAM allocated to this document. - // Don't forget to change this value to match your requirement. - // Use https://arduinojson.org/v6/assistant to compute the capacity. JsonDocument doc; // Add values in the document - // doc["sensor"] = "gps"; doc["time"] = 1351824120; // Add an array. - // JsonArray data = doc.createNestedArray("data"); data.add(48.756080); data.add(2.302038); // Generate the minified JSON and send it to the Serial port. - // serializeJson(doc, Serial); // The above line prints: // {"sensor":"gps","time":1351824120,"data":[48.756080,2.302038]} @@ -42,7 +35,6 @@ void setup() { Serial.println(); // Generate the prettified JSON and send it to the Serial port. - // serializeJsonPretty(doc, Serial); // The above line prints: // { diff --git a/examples/JsonHttpClient/JsonHttpClient.ino b/examples/JsonHttpClient/JsonHttpClient.ino index 60d2991f..5cb1c2a5 100644 --- a/examples/JsonHttpClient/JsonHttpClient.ino +++ b/examples/JsonHttpClient/JsonHttpClient.ino @@ -78,7 +78,6 @@ void setup() { } // Allocate the JSON document - // Use https://arduinojson.org/v6/assistant to compute the capacity. JsonDocument doc; // Parse JSON object diff --git a/examples/JsonParserExample/JsonParserExample.ino b/examples/JsonParserExample/JsonParserExample.ino index 24787113..853a81ac 100644 --- a/examples/JsonParserExample/JsonParserExample.ino +++ b/examples/JsonParserExample/JsonParserExample.ino @@ -15,20 +15,9 @@ void setup() { continue; // Allocate the JSON document - // - // Inside the parentheses, 200 is the capacity of the memory pool in bytes. - // Don't forget to change this value to match your JSON document. - // Use https://arduinojson.org/v6/assistant to compute the capacity. JsonDocument doc; // JSON input string. - // - // Using a char[], as shown here, enables the "zero-copy" mode. This mode uses - // the minimal amount of memory because the JsonDocument stores pointers to - // the input buffer. - // If you use another type of input, ArduinoJson must copy the strings from - // the input to the JsonDocument, so you need to increase the capacity of the - // JsonDocument. char json[] = "{\"sensor\":\"gps\",\"time\":1351824120,\"data\":[48.756080,2.302038]}"; diff --git a/examples/JsonServer/JsonServer.ino b/examples/JsonServer/JsonServer.ino index 7d95f9de..cfebc8a0 100644 --- a/examples/JsonServer/JsonServer.ino +++ b/examples/JsonServer/JsonServer.ino @@ -57,7 +57,6 @@ void loop() { client.read(); // Allocate a temporary JsonDocument - // Use https://arduinojson.org/v6/assistant to compute the capacity. JsonDocument doc; // Create the "analog" array diff --git a/examples/JsonUdpBeacon/JsonUdpBeacon.ino b/examples/JsonUdpBeacon/JsonUdpBeacon.ino index 501e34ef..39a126af 100644 --- a/examples/JsonUdpBeacon/JsonUdpBeacon.ino +++ b/examples/JsonUdpBeacon/JsonUdpBeacon.ino @@ -47,7 +47,6 @@ void setup() { void loop() { // Allocate a temporary JsonDocument - // Use https://arduinojson.org/v6/assistant to compute the capacity. JsonDocument doc; // Create the "analog" array diff --git a/examples/MsgPackParser/MsgPackParser.ino b/examples/MsgPackParser/MsgPackParser.ino index a6bb73b1..83527f45 100644 --- a/examples/MsgPackParser/MsgPackParser.ino +++ b/examples/MsgPackParser/MsgPackParser.ino @@ -16,20 +16,9 @@ void setup() { continue; // Allocate the JSON document - // - // Inside the parentheses, 200 is the capacity of the memory pool in bytes. - // Don't forget to change this value to match your JSON document. - // Use https://arduinojson.org/v6/assistant to compute the capacity. JsonDocument doc; // MessagePack input string. - // - // Using a char[], as shown here, enables the "zero-copy" mode. This mode uses - // the minimal amount of memory because the JsonDocument stores pointers to - // the input buffer. - // If you use another type of input, ArduinoJson must copy the strings from - // the input to the JsonDocument, so you need to increase the capacity of the - // JsonDocument. uint8_t input[] = {131, 166, 115, 101, 110, 115, 111, 114, 163, 103, 112, 115, 164, 116, 105, 109, 101, 206, 80, 147, 50, 248, 164, 100, 97, 116, 97, 146, 203, 64, 72, 96, 199, 58, 188, 148,