Skip to content

Commit

Permalink
Fix deprecated warnings from ArduinoJson library
Browse files Browse the repository at this point in the history
  • Loading branch information
pe-jot committed Sep 11, 2024
1 parent d074feb commit 854d025
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/project_configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ void ProjectConfigurationManagement::writeProjectConfiguration(Configuration &co
}

data["wifi"]["active"] = conf.wifi.active;
JsonArray aps = data["wifi"].createNestedArray("AP");
JsonArray aps = data["wifi"]["AP"].to<JsonArray>();
for (Configuration::Wifi::AP ap : conf.wifi.APs) {
JsonObject v = aps.createNestedObject();
JsonObject v = aps.add<JsonObject>();
v["SSID"] = ap.SSID;
v["password"] = ap.password;
}
Expand Down Expand Up @@ -165,9 +165,9 @@ void ProjectConfigurationManagement::writeProjectConfiguration(Configuration &co
data["display"]["overwrite_pin"] = conf.display.overwritePin;
data["display"]["turn180"] = conf.display.turn180;
data["ftp"]["active"] = conf.ftp.active;
JsonArray users = data["ftp"].createNestedArray("user");
JsonArray users = data["ftp"]["user"].to<JsonArray>();
for (Configuration::Ftp::User u : conf.ftp.users) {
JsonObject v = users.createNestedObject();
JsonObject v = users.add<JsonObject>();
v["name"] = u.name;
v["password"] = u.password;
}
Expand Down

0 comments on commit 854d025

Please sign in to comment.