mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-18 04:52:22 +02:00
Remove capacity from JsonDocument
's constructor
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user