Replace deprecated StaticJsonDocument type

This commit is contained in:
2025-04-24 16:15:36 +02:00
parent f195bd7417
commit a74f7d64cf
3 changed files with 4 additions and 4 deletions

View File

@@ -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;