Clean up power/thermal to use readJsonObject
Change-Id: I69ed29472b209e8782be63c3f0f2e8ca63dc14a4
Signed-off-by: Ed Tanous <ed@tanous.net>
diff --git a/redfish-core/lib/sensors.hpp b/redfish-core/lib/sensors.hpp
index 4f44b5a..e6de44d 100644
--- a/redfish-core/lib/sensors.hpp
+++ b/redfish-core/lib/sensors.hpp
@@ -2631,7 +2631,7 @@
*/
inline void setSensorsOverride(
const std::shared_ptr<SensorsAsyncResp>& sensorAsyncResp,
- std::unordered_map<std::string, std::vector<nlohmann::json>>&
+ std::unordered_map<std::string, std::vector<nlohmann::json::object_t>>&
allCollections)
{
BMCWEB_LOG_INFO("setSensorsOverride for subNode{}",
@@ -2657,9 +2657,9 @@
}
for (auto& item : collectionItems.second)
{
- if (!json_util::readJson(item, sensorAsyncResp->asyncResp->res,
- "MemberId", memberId, propertyValueName,
- value))
+ if (!json_util::readJsonObject(
+ item, sensorAsyncResp->asyncResp->res, "MemberId", memberId,
+ propertyValueName, value))
{
return;
}