Enable comments in config json
It's often useful to be able to annotate bits of configuration with
explanatory comments (e.g. regarding hardware-specific quirks of certain
platforms); this allows us to do so.
Tested: added '//' and '/**/' comments to an power-config-host0.json,
power-control worked as expected.
Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: I46ae6371a5a4a083bdadefc2f810e47450a2c4aa
diff --git a/power-control-x86/src/power_control.cpp b/power-control-x86/src/power_control.cpp
index 963539a..b257349 100644
--- a/power-control-x86/src/power_control.cpp
+++ b/power-control-x86/src/power_control.cpp
@@ -2464,7 +2464,7 @@
"loadConfigValues : Cannot open config path");
return -1;
}
- auto jsonData = nlohmann::json::parse(configFile, nullptr);
+ auto jsonData = nlohmann::json::parse(configFile, nullptr, true, true);
if (jsonData.is_discarded())
{