Replace deprecated StaticJsonDocument type
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#include "config.h"
|
||||
|
||||
void initialize_config(Config *config, StaticJsonDocument<512> json) {
|
||||
void initialize_config(Config *config, JsonDocument json) {
|
||||
config->ssid = strdup(json["ssid"]);
|
||||
config->psk = strdup(json["psk"]);
|
||||
config->mqtt_host = strdup(json["mqtt_host"]);
|
||||
@@ -19,7 +19,7 @@ bool load_config_file(const char *file_path, Config *config) {
|
||||
File config_file = LittleFS.open(file_path, "r");
|
||||
if (!config_file)
|
||||
return false;
|
||||
StaticJsonDocument<512> json;
|
||||
JsonDocument json;
|
||||
DeserializationError err = deserializeJson(json, config_file);
|
||||
if (err)
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user