Remove capacity from JsonDocument's constructor

This commit is contained in:
Benoit Blanchon
2023-07-17 18:15:13 +02:00
parent 42b2840009
commit 0f319e7ca4
162 changed files with 438 additions and 500 deletions

View File

@ -45,7 +45,7 @@ void loadConfiguration(const char* filename, Config& config) {
// 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(512);
JsonDocument doc;
// Deserialize the JSON document
DeserializationError error = deserializeJson(doc, file);
@ -77,7 +77,7 @@ 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(256);
JsonDocument doc;
// Set the values in the document
doc["hostname"] = config.hostname;