Refactor some JSON stuff for performance, and fix a build error.
This commit is contained in:
parent
6fb49f68fc
commit
a064e19b8a
7 changed files with 188 additions and 218 deletions
|
@ -515,7 +515,7 @@ unsigned int ControlPlane::handleRequest(
|
|||
_svc->getNetworkSettings(nws->networks[i].nwid,localSettings);
|
||||
|
||||
try {
|
||||
nlohmann::json j(nlohmann::json::parse(body));
|
||||
nlohmann::json j(OSUtils::jsonParse(body));
|
||||
if (j.is_object()) {
|
||||
nlohmann::json &allowManaged = j["allowManaged"];
|
||||
if (allowManaged.is_boolean()) localSettings.allowManaged = (bool)allowManaged;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue