Refactor some JSON stuff for performance, and fix a build error.

This commit is contained in:
Adam Ierymenko 2017-01-10 13:51:10 -08:00
parent 6fb49f68fc
commit a064e19b8a
7 changed files with 188 additions and 218 deletions

View file

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