Remove brace initialization of json objects

Brace initialization of json objects, while quite interesting from an
academic sense, are very difficult for people to grok, and lead to
inconsistencies.  This patchset aims to remove a majority of them in
lieu of operator[].  Interestingly, this saves about 1% of the binary
size of bmcweb.

This also has an added benefit that as a design pattern, we're never
constructing a new object, then moving it into place, we're always
adding to the existing object, which in the future _could_ make things
like OEM schemas or properties easier, as there's no case where we're
completely replacing the response object.

Tested:
Ran redfish service validator.  No new failures.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Iae409b0a40ddd3ae6112cb2d52c6f6ab388595fe
diff --git a/redfish-core/lib/processor.hpp b/redfish-core/lib/processor.hpp
index 2a0e028..e0346de 100644
--- a/redfish-core/lib/processor.hpp
+++ b/redfish-core/lib/processor.hpp
@@ -555,7 +555,9 @@
                     const std::string& dbusPath = dbusPathWrapper->str;
                     std::string uri = "/redfish/v1/Systems/system/Processors/" +
                                       cpuId + "/OperatingConfigs";
-                    json["OperatingConfigs"] = {{"@odata.id", uri}};
+                    nlohmann::json::object_t operatingConfig;
+                    operatingConfig["@odata.id"] = uri;
+                    json["OperatingConfigs"] = std::move(operatingConfig);
 
                     // Reuse the D-Bus config object name for the Redfish
                     // URI
@@ -571,7 +573,10 @@
                     }
                     uri += '/';
                     uri += dbusPath.substr(baseNamePos + 1);
-                    json["AppliedOperatingConfig"] = {{"@odata.id", uri}};
+                    nlohmann::json::object_t appliedOperatingConfig;
+                    appliedOperatingConfig["@odata.id"] = uri;
+                    json["AppliedOperatingConfig"] =
+                        std::move(appliedOperatingConfig);
 
                     // Once we found the current applied config, queue another
                     // request to read the base freq core ids out of that
@@ -885,8 +890,10 @@
                     turboArray = nlohmann::json::array();
                     for (const auto& [turboSpeed, coreCount] : *turboList)
                     {
-                        turboArray.push_back({{"ActiveCoreCount", coreCount},
-                                              {"MaxSpeedMHz", turboSpeed}});
+                        nlohmann::json::object_t turbo;
+                        turbo["ActiveCoreCount"] = coreCount;
+                        turbo["MaxSpeedMHz"] = turboSpeed;
+                        turboArray.push_back(std::move(turbo));
                     }
                 }
                 else if (key == "BaseSpeedPrioritySettings")
@@ -904,10 +911,11 @@
                     baseSpeedArray = nlohmann::json::array();
                     for (const auto& [baseSpeed, coreList] : *baseSpeedList)
                     {
-                        baseSpeedArray.push_back(
-                            {{"CoreCount", coreList.size()},
-                             {"CoreIDs", coreList},
-                             {"BaseSpeedMHz", baseSpeed}});
+                        nlohmann::json::object_t speed;
+                        speed["CoreCount"] = coreList.size();
+                        speed["CoreIDs"] = coreList;
+                        speed["BaseSpeedMHz"] = baseSpeed;
+                        baseSpeedArray.push_back(std::move(speed));
                     }
                 }
             }