Clean up management console rest to use readJson

Change-Id: Idc37e3e98296cf59aa6fab499a27d7ed899b71dd
Signed-off-by: Ed Tanous <ed@tanous.net>
diff --git a/include/ibm/management_console_rest.hpp b/include/ibm/management_console_rest.hpp
index 103017b..a2da64f 100644
--- a/include/ibm/management_console_rest.hpp
+++ b/include/ibm/management_console_rest.hpp
@@ -403,7 +403,7 @@
 inline void
     handleAcquireLockAPI(const crow::Request& req,
                          const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
-                         std::vector<nlohmann::json> body)
+                         std::vector<nlohmann::json::object_t> body)
 {
     LockRequests lockRequestStructure;
     for (auto& element : body)
@@ -412,11 +412,11 @@
         uint64_t resourceId = 0;
 
         SegmentFlags segInfo;
-        std::vector<nlohmann::json> segmentFlags;
+        std::vector<nlohmann::json::object_t> segmentFlags;
 
-        if (!redfish::json_util::readJson(element, asyncResp->res, "LockType",
-                                          lockType, "ResourceID", resourceId,
-                                          "SegmentFlags", segmentFlags))
+        if (!redfish::json_util::readJsonObject(
+                element, asyncResp->res, "LockType", lockType, "ResourceID",
+                resourceId, "SegmentFlags", segmentFlags))
         {
             BMCWEB_LOG_DEBUG("Not a Valid JSON");
             asyncResp->res.result(boost::beast::http::status::bad_request);
@@ -432,9 +432,9 @@
             std::string lockFlags;
             uint32_t segmentLength = 0;
 
-            if (!redfish::json_util::readJson(e, asyncResp->res, "LockFlag",
-                                              lockFlags, "SegmentLength",
-                                              segmentLength))
+            if (!redfish::json_util::readJsonObject(
+                    e, asyncResp->res, "LockFlag", lockFlags, "SegmentLength",
+                    segmentLength))
             {
                 asyncResp->res.result(boost::beast::http::status::bad_request);
                 return;
@@ -744,7 +744,7 @@
         .methods(boost::beast::http::verb::post)(
             [](const crow::Request& req,
                const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) {
-        std::vector<nlohmann::json> body;
+        std::vector<nlohmann::json::object_t> body;
         if (!redfish::json_util::readJsonAction(req, asyncResp->res, "Request",
                                                 body))
         {