Make registries return an object_t

All the registry helper functions should return an object_t, given that
they're guaranteed to return an object.  nlohmann::json as a type can
technically be string/int/bool/null/object/array, so it causes some
peculiarities in parsing.

Change-Id: If296477cb8d066d7f44ef0d12f17d94a5301e450
Signed-off-by: Ed Tanous <ed@tanous.net>
diff --git a/redfish-core/src/error_messages.cpp b/redfish-core/src/error_messages.cpp
index 1d6a544..317b9e8 100644
--- a/redfish-core/src/error_messages.cpp
+++ b/redfish-core/src/error_messages.cpp
@@ -40,8 +40,8 @@
 namespace messages
 {
 
-static nlohmann::json getLog(redfish::registries::Base::Index name,
-                             std::span<const std::string_view> args)
+static nlohmann::json::object_t getLog(redfish::registries::Base::Index name,
+                                       std::span<const std::string_view> args)
 {
     size_t index = static_cast<size_t>(name);
     if (index >= redfish::registries::Base::registry.size())
@@ -59,7 +59,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json success()
+nlohmann::json::object_t success()
 {
     return getLog(redfish::registries::Base::Index::success, {});
 }
@@ -76,7 +76,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json generalError()
+nlohmann::json::object_t generalError()
 {
     return getLog(redfish::registries::Base::Index::generalError, {});
 }
@@ -94,7 +94,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json created()
+nlohmann::json::object_t created()
 {
     return getLog(redfish::registries::Base::Index::created, {});
 }
@@ -112,7 +112,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json noOperation()
+nlohmann::json::object_t noOperation()
 {
     return getLog(redfish::registries::Base::Index::noOperation, {});
 }
@@ -130,7 +130,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json propertyDuplicate(std::string_view arg1)
+nlohmann::json::object_t propertyDuplicate(std::string_view arg1)
 {
     return getLog(redfish::registries::Base::Index::propertyDuplicate,
                   std::to_array({arg1}));
@@ -149,7 +149,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json propertyUnknown(std::string_view arg1)
+nlohmann::json::object_t propertyUnknown(std::string_view arg1)
 {
     return getLog(redfish::registries::Base::Index::propertyUnknown,
                   std::to_array({arg1}));
@@ -168,8 +168,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json propertyValueTypeError(const nlohmann::json& arg1,
-                                      std::string_view arg2)
+nlohmann::json::object_t propertyValueTypeError(const nlohmann::json& arg1,
+                                                std::string_view arg2)
 {
     std::string arg1Str =
         arg1.dump(-1, ' ', true, nlohmann::json::error_handler_t::replace);
@@ -191,8 +191,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json propertyValueFormatError(const nlohmann::json& arg1,
-                                        std::string_view arg2)
+nlohmann::json::object_t propertyValueFormatError(const nlohmann::json& arg1,
+                                                  std::string_view arg2)
 {
     std::string arg1Str =
         arg1.dump(-1, ' ', true, nlohmann::json::error_handler_t::replace);
@@ -214,8 +214,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json propertyValueNotInList(const nlohmann::json& arg1,
-                                      std::string_view arg2)
+nlohmann::json::object_t propertyValueNotInList(const nlohmann::json& arg1,
+                                                std::string_view arg2)
 {
     std::string arg1Str =
         arg1.dump(-1, ' ', true, nlohmann::json::error_handler_t::replace);
@@ -237,8 +237,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json propertyValueOutOfRange(const nlohmann::json& arg1,
-                                       std::string_view arg2)
+nlohmann::json::object_t propertyValueOutOfRange(const nlohmann::json& arg1,
+                                                 std::string_view arg2)
 {
     std::string arg1Str =
         arg1.dump(-1, ' ', true, nlohmann::json::error_handler_t::replace);
@@ -260,7 +260,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json propertyValueError(std::string_view arg1)
+nlohmann::json::object_t propertyValueError(std::string_view arg1)
 {
     return getLog(redfish::registries::Base::Index::propertyValueError,
                   std::to_array({arg1}));
@@ -279,7 +279,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json propertyNotWritable(std::string_view arg1)
+nlohmann::json::object_t propertyNotWritable(std::string_view arg1)
 {
     return getLog(redfish::registries::Base::Index::propertyNotWritable,
                   std::to_array({arg1}));
@@ -298,7 +298,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json propertyNotUpdated(std::string_view arg1)
+nlohmann::json::object_t propertyNotUpdated(std::string_view arg1)
 {
     return getLog(redfish::registries::Base::Index::propertyNotUpdated,
                   std::to_array({arg1}));
@@ -317,7 +317,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json propertyMissing(std::string_view arg1)
+nlohmann::json::object_t propertyMissing(std::string_view arg1)
 {
     return getLog(redfish::registries::Base::Index::propertyMissing,
                   std::to_array({arg1}));
@@ -336,7 +336,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json malformedJSON()
+nlohmann::json::object_t malformedJSON()
 {
     return getLog(redfish::registries::Base::Index::malformedJSON, {});
 }
@@ -354,7 +354,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json invalidJSON(std::string_view arg1)
+nlohmann::json::object_t invalidJSON(std::string_view arg1)
 {
     return getLog(redfish::registries::Base::Index::invalidJSON,
                   std::to_array({arg1}));
@@ -373,7 +373,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json emptyJSON()
+nlohmann::json::object_t emptyJSON()
 {
     return getLog(redfish::registries::Base::Index::emptyJSON, {});
 }
@@ -391,7 +391,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json actionNotSupported(std::string_view arg1)
+nlohmann::json::object_t actionNotSupported(std::string_view arg1)
 {
     return getLog(redfish::registries::Base::Index::actionNotSupported,
                   std::to_array({arg1}));
@@ -410,8 +410,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json actionParameterMissing(std::string_view arg1,
-                                      std::string_view arg2)
+nlohmann::json::object_t actionParameterMissing(std::string_view arg1,
+                                                std::string_view arg2)
 {
     return getLog(redfish::registries::Base::Index::actionParameterMissing,
                   std::to_array({arg1, arg2}));
@@ -431,8 +431,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json actionParameterDuplicate(std::string_view arg1,
-                                        std::string_view arg2)
+nlohmann::json::object_t actionParameterDuplicate(std::string_view arg1,
+                                                  std::string_view arg2)
 {
     return getLog(redfish::registries::Base::Index::actionParameterDuplicate,
                   std::to_array({arg1, arg2}));
@@ -452,8 +452,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json actionParameterUnknown(std::string_view arg1,
-                                      std::string_view arg2)
+nlohmann::json::object_t actionParameterUnknown(std::string_view arg1,
+                                                std::string_view arg2)
 {
     return getLog(redfish::registries::Base::Index::actionParameterUnknown,
                   std::to_array({arg1, arg2}));
@@ -473,7 +473,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json actionParameterValueTypeError(
+nlohmann::json::object_t actionParameterValueTypeError(
     const nlohmann::json& arg1, std::string_view arg2, std::string_view arg3)
 {
     std::string arg1Str =
@@ -499,7 +499,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json actionParameterValueFormatError(
+nlohmann::json::object_t actionParameterValueFormatError(
     const nlohmann::json& arg1, std::string_view arg2, std::string_view arg3)
 {
     std::string arg1Str =
@@ -525,7 +525,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json actionParameterValueNotInList(
+nlohmann::json::object_t actionParameterValueNotInList(
     std::string_view arg1, std::string_view arg2, std::string_view arg3)
 {
     return getLog(
@@ -548,7 +548,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json actionParameterValueOutOfRange(
+nlohmann::json::object_t actionParameterValueOutOfRange(
     std::string_view arg1, std::string_view arg2, std::string_view arg3)
 {
     return getLog(
@@ -572,8 +572,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json actionParameterValueError(const nlohmann::json& arg1,
-                                         std::string_view arg2)
+nlohmann::json::object_t actionParameterValueError(const nlohmann::json& arg1,
+                                                   std::string_view arg2)
 {
     std::string arg1Str =
         arg1.dump(-1, ' ', true, nlohmann::json::error_handler_t::replace);
@@ -595,8 +595,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json actionParameterNotSupported(std::string_view arg1,
-                                           std::string_view arg2)
+nlohmann::json::object_t actionParameterNotSupported(std::string_view arg1,
+                                                     std::string_view arg2)
 {
     return getLog(redfish::registries::Base::Index::actionParameterNotSupported,
                   std::to_array({arg1, arg2}));
@@ -617,7 +617,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json arraySizeTooLong(std::string_view arg1, uint64_t arg2)
+nlohmann::json::object_t arraySizeTooLong(std::string_view arg1, uint64_t arg2)
 {
     std::string arg2Str = std::to_string(arg2);
     return getLog(redfish::registries::Base::Index::arraySizeTooLong,
@@ -637,7 +637,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json arraySizeTooShort(std::string_view arg1, std::string_view arg2)
+nlohmann::json::object_t arraySizeTooShort(std::string_view arg1,
+                                           std::string_view arg2)
 {
     return getLog(redfish::registries::Base::Index::arraySizeTooShort,
                   std::to_array({arg1, arg2}));
@@ -657,8 +658,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json queryParameterValueTypeError(const nlohmann::json& arg1,
-                                            std::string_view arg2)
+nlohmann::json::object_t queryParameterValueTypeError(
+    const nlohmann::json& arg1, std::string_view arg2)
 {
     std::string arg1Str =
         arg1.dump(-1, ' ', true, nlohmann::json::error_handler_t::replace);
@@ -682,8 +683,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json queryParameterValueFormatError(const nlohmann::json& arg1,
-                                              std::string_view arg2)
+nlohmann::json::object_t queryParameterValueFormatError(
+    const nlohmann::json& arg1, std::string_view arg2)
 {
     std::string arg1Str =
         arg1.dump(-1, ' ', true, nlohmann::json::error_handler_t::replace);
@@ -707,7 +708,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json queryParameterValueError(std::string_view arg1)
+nlohmann::json::object_t queryParameterValueError(std::string_view arg1)
 {
     return getLog(redfish::registries::Base::Index::queryParameterValueError,
                   std::to_array({arg1}));
@@ -726,7 +727,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json queryParameterOutOfRange(
+nlohmann::json::object_t queryParameterOutOfRange(
     std::string_view arg1, std::string_view arg2, std::string_view arg3)
 {
     return getLog(redfish::registries::Base::Index::queryParameterOutOfRange,
@@ -748,7 +749,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json queryNotSupportedOnResource()
+nlohmann::json::object_t queryNotSupportedOnResource()
 {
     return getLog(redfish::registries::Base::Index::queryNotSupportedOnResource,
                   {});
@@ -767,7 +768,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json queryNotSupportedOnOperation()
+nlohmann::json::object_t queryNotSupportedOnOperation()
 {
     return getLog(
         redfish::registries::Base::Index::queryNotSupportedOnOperation, {});
@@ -786,7 +787,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json queryNotSupported()
+nlohmann::json::object_t queryNotSupported()
 {
     return getLog(redfish::registries::Base::Index::queryNotSupported, {});
 }
@@ -804,7 +805,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json queryCombinationInvalid()
+nlohmann::json::object_t queryCombinationInvalid()
 {
     return getLog(redfish::registries::Base::Index::queryCombinationInvalid,
                   {});
@@ -823,7 +824,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json queryParameterUnsupported(std::string_view arg1)
+nlohmann::json::object_t queryParameterUnsupported(std::string_view arg1)
 {
     return getLog(redfish::registries::Base::Index::queryParameterUnsupported,
                   std::to_array({arg1}));
@@ -842,7 +843,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json sessionLimitExceeded()
+nlohmann::json::object_t sessionLimitExceeded()
 {
     return getLog(redfish::registries::Base::Index::sessionLimitExceeded, {});
 }
@@ -860,7 +861,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json eventSubscriptionLimitExceeded()
+nlohmann::json::object_t eventSubscriptionLimitExceeded()
 {
     return getLog(
         redfish::registries::Base::Index::eventSubscriptionLimitExceeded, {});
@@ -879,7 +880,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json resourceCannotBeDeleted()
+nlohmann::json::object_t resourceCannotBeDeleted()
 {
     return getLog(redfish::registries::Base::Index::resourceCannotBeDeleted,
                   {});
@@ -898,7 +899,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json resourceInUse()
+nlohmann::json::object_t resourceInUse()
 {
     return getLog(redfish::registries::Base::Index::resourceInUse, {});
 }
@@ -916,7 +917,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json resourceAlreadyExists(
+nlohmann::json::object_t resourceAlreadyExists(
     std::string_view arg1, std::string_view arg2, std::string_view arg3)
 {
     return getLog(redfish::registries::Base::Index::resourceAlreadyExists,
@@ -938,7 +939,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json resourceNotFound(std::string_view arg1, std::string_view arg2)
+nlohmann::json::object_t resourceNotFound(std::string_view arg1,
+                                          std::string_view arg2)
 {
     return getLog(redfish::registries::Base::Index::resourceNotFound,
                   std::to_array({arg1, arg2}));
@@ -958,7 +960,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json payloadTooLarge()
+nlohmann::json::object_t payloadTooLarge()
 {
     return getLog(redfish::registries::Base::Index::payloadTooLarge, {});
 }
@@ -976,7 +978,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json insufficientStorage()
+nlohmann::json::object_t insufficientStorage()
 {
     return getLog(redfish::registries::Base::Index::insufficientStorage, {});
 }
@@ -994,7 +996,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json missingOrMalformedPart()
+nlohmann::json::object_t missingOrMalformedPart()
 {
     return getLog(redfish::registries::Base::Index::missingOrMalformedPart, {});
 }
@@ -1012,7 +1014,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json invalidURI(std::string_view arg1)
+nlohmann::json::object_t invalidURI(std::string_view arg1)
 {
     return getLog(redfish::registries::Base::Index::invalidURI,
                   std::to_array({arg1}));
@@ -1031,7 +1033,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json createFailedMissingReqProperties(std::string_view arg1)
+nlohmann::json::object_t createFailedMissingReqProperties(std::string_view arg1)
 {
     return getLog(
         redfish::registries::Base::Index::createFailedMissingReqProperties,
@@ -1053,7 +1055,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json createLimitReachedForResource()
+nlohmann::json::object_t createLimitReachedForResource()
 {
     return getLog(
         redfish::registries::Base::Index::createLimitReachedForResource, {});
@@ -1072,7 +1074,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json serviceShuttingDown()
+nlohmann::json::object_t serviceShuttingDown()
 {
     return getLog(redfish::registries::Base::Index::serviceShuttingDown, {});
 }
@@ -1090,7 +1092,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json serviceInUnknownState()
+nlohmann::json::object_t serviceInUnknownState()
 {
     return getLog(redfish::registries::Base::Index::serviceInUnknownState, {});
 }
@@ -1108,7 +1110,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json noValidSession()
+nlohmann::json::object_t noValidSession()
 {
     return getLog(redfish::registries::Base::Index::noValidSession, {});
 }
@@ -1126,7 +1128,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json insufficientPrivilege()
+nlohmann::json::object_t insufficientPrivilege()
 {
     return getLog(redfish::registries::Base::Index::insufficientPrivilege, {});
 }
@@ -1144,7 +1146,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json accountModified()
+nlohmann::json::object_t accountModified()
 {
     return getLog(redfish::registries::Base::Index::accountModified, {});
 }
@@ -1162,7 +1164,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json accountNotModified()
+nlohmann::json::object_t accountNotModified()
 {
     return getLog(redfish::registries::Base::Index::accountNotModified, {});
 }
@@ -1180,7 +1182,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json accountRemoved()
+nlohmann::json::object_t accountRemoved()
 {
     return getLog(redfish::registries::Base::Index::accountRemoved, {});
 }
@@ -1198,7 +1200,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json accountForSessionNoLongerExists()
+nlohmann::json::object_t accountForSessionNoLongerExists()
 {
     return getLog(
         redfish::registries::Base::Index::accountForSessionNoLongerExists, {});
@@ -1217,7 +1219,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json invalidObject(const boost::urls::url_view_base& arg1)
+nlohmann::json::object_t invalidObject(const boost::urls::url_view_base& arg1)
 {
     return getLog(redfish::registries::Base::Index::invalidObject,
                   std::to_array<std::string_view>({arg1.buffer()}));
@@ -1236,7 +1238,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json internalError()
+nlohmann::json::object_t internalError()
 {
     return getLog(redfish::registries::Base::Index::internalError, {});
 }
@@ -1257,7 +1259,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json unrecognizedRequestBody()
+nlohmann::json::object_t unrecognizedRequestBody()
 {
     return getLog(redfish::registries::Base::Index::unrecognizedRequestBody,
                   {});
@@ -1276,7 +1278,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json resourceMissingAtURI(const boost::urls::url_view_base& arg1)
+nlohmann::json::object_t resourceMissingAtURI(
+    const boost::urls::url_view_base& arg1)
 {
     return getLog(redfish::registries::Base::Index::resourceMissingAtURI,
                   std::to_array<std::string_view>({arg1.buffer()}));
@@ -1296,7 +1299,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json resourceAtUriInUnknownFormat(
+nlohmann::json::object_t resourceAtUriInUnknownFormat(
     const boost::urls::url_view_base& arg1)
 {
     return getLog(
@@ -1318,8 +1321,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json resourceAtUriUnauthorized(const boost::urls::url_view_base& arg1,
-                                         std::string_view arg2)
+nlohmann::json::object_t resourceAtUriUnauthorized(
+    const boost::urls::url_view_base& arg1, std::string_view arg2)
 {
     return getLog(redfish::registries::Base::Index::resourceAtUriUnauthorized,
                   std::to_array<std::string_view>({arg1.buffer(), arg2}));
@@ -1340,7 +1343,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json couldNotEstablishConnection(
+nlohmann::json::object_t couldNotEstablishConnection(
     const boost::urls::url_view_base& arg1)
 {
     return getLog(redfish::registries::Base::Index::couldNotEstablishConnection,
@@ -1361,7 +1364,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json sourceDoesNotSupportProtocol(
+nlohmann::json::object_t sourceDoesNotSupportProtocol(
     const boost::urls::url_view_base& arg1, std::string_view arg2)
 {
     return getLog(
@@ -1385,7 +1388,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json accessDenied(const boost::urls::url_view_base& arg1)
+nlohmann::json::object_t accessDenied(const boost::urls::url_view_base& arg1)
 {
     return getLog(redfish::registries::Base::Index::accessDenied,
                   std::to_array<std::string_view>({arg1.buffer()}));
@@ -1404,7 +1407,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json serviceTemporarilyUnavailable(std::string_view arg1)
+nlohmann::json::object_t serviceTemporarilyUnavailable(std::string_view arg1)
 {
     return getLog(
         redfish::registries::Base::Index::serviceTemporarilyUnavailable,
@@ -1425,7 +1428,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json invalidIndex(uint64_t arg1)
+nlohmann::json::object_t invalidIndex(uint64_t arg1)
 {
     std::string arg1Str = std::to_string(arg1);
     return getLog(redfish::registries::Base::Index::invalidIndex,
@@ -1445,8 +1448,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json propertyValueModified(std::string_view arg1,
-                                     const nlohmann::json& arg2)
+nlohmann::json::object_t propertyValueModified(std::string_view arg1,
+                                               const nlohmann::json& arg2)
 {
     std::string arg2Str =
         arg2.dump(-1, ' ', true, nlohmann::json::error_handler_t::replace);
@@ -1468,7 +1471,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json resourceInStandby()
+nlohmann::json::object_t resourceInStandby()
 {
     return getLog(redfish::registries::Base::Index::resourceInStandby, {});
 }
@@ -1486,7 +1489,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json resourceExhaustion(std::string_view arg1)
+nlohmann::json::object_t resourceExhaustion(std::string_view arg1)
 {
     return getLog(redfish::registries::Base::Index::resourceExhaustion,
                   std::to_array({arg1}));
@@ -1505,7 +1508,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json stringValueTooLong(std::string_view arg1, uint64_t arg2)
+nlohmann::json::object_t stringValueTooLong(std::string_view arg1,
+                                            uint64_t arg2)
 {
     std::string arg2Str = std::to_string(arg2);
     return getLog(redfish::registries::Base::Index::stringValueTooLong,
@@ -1526,7 +1530,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json stringValueTooShort(std::string_view arg1, std::string_view arg2)
+nlohmann::json::object_t stringValueTooShort(std::string_view arg1,
+                                             std::string_view arg2)
 {
     return getLog(redfish::registries::Base::Index::stringValueTooShort,
                   std::to_array({arg1, arg2}));
@@ -1546,7 +1551,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json sessionTerminated()
+nlohmann::json::object_t sessionTerminated()
 {
     return getLog(redfish::registries::Base::Index::sessionTerminated, {});
 }
@@ -1564,7 +1569,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json subscriptionTerminated()
+nlohmann::json::object_t subscriptionTerminated()
 {
     return getLog(redfish::registries::Base::Index::subscriptionTerminated, {});
 }
@@ -1582,8 +1587,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json resourceTypeIncompatible(std::string_view arg1,
-                                        std::string_view arg2)
+nlohmann::json::object_t resourceTypeIncompatible(std::string_view arg1,
+                                                  std::string_view arg2)
 {
     return getLog(redfish::registries::Base::Index::resourceTypeIncompatible,
                   std::to_array({arg1, arg2}));
@@ -1603,7 +1608,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json passwordChangeRequired(const boost::urls::url_view_base& arg1)
+nlohmann::json::object_t passwordChangeRequired(
+    const boost::urls::url_view_base& arg1)
 {
     return getLog(redfish::registries::Base::Index::passwordChangeRequired,
                   std::to_array<std::string_view>({arg1.buffer()}));
@@ -1622,8 +1628,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json resetRequired(const boost::urls::url_view_base& arg1,
-                             std::string_view arg2)
+nlohmann::json::object_t resetRequired(const boost::urls::url_view_base& arg1,
+                                       std::string_view arg2)
 {
     return getLog(redfish::registries::Base::Index::resetRequired,
                   std::to_array<std::string_view>({arg1.buffer(), arg2}));
@@ -1643,7 +1649,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json resetRecommended(std::string_view arg1, std::string_view arg2)
+nlohmann::json::object_t resetRecommended(std::string_view arg1,
+                                          std::string_view arg2)
 {
     return getLog(redfish::registries::Base::Index::resetRecommended,
                   std::to_array({arg1, arg2}));
@@ -1663,7 +1670,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json chassisPowerStateOnRequired(std::string_view arg1)
+nlohmann::json::object_t chassisPowerStateOnRequired(std::string_view arg1)
 {
     return getLog(redfish::registries::Base::Index::chassisPowerStateOnRequired,
                   std::to_array({arg1}));
@@ -1682,7 +1689,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json chassisPowerStateOffRequired(std::string_view arg1)
+nlohmann::json::object_t chassisPowerStateOffRequired(std::string_view arg1)
 {
     return getLog(
         redfish::registries::Base::Index::chassisPowerStateOffRequired,
@@ -1702,8 +1709,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json propertyValueConflict(std::string_view arg1,
-                                     std::string_view arg2)
+nlohmann::json::object_t propertyValueConflict(std::string_view arg1,
+                                               std::string_view arg2)
 {
     return getLog(redfish::registries::Base::Index::propertyValueConflict,
                   std::to_array({arg1, arg2}));
@@ -1723,7 +1730,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json propertyValueResourceConflict(
+nlohmann::json::object_t propertyValueResourceConflict(
     std::string_view arg1, const nlohmann::json& arg2,
     const boost::urls::url_view_base& arg3)
 {
@@ -1750,8 +1757,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json propertyValueExternalConflict(std::string_view arg1,
-                                             const nlohmann::json& arg2)
+nlohmann::json::object_t propertyValueExternalConflict(
+    std::string_view arg1, const nlohmann::json& arg2)
 {
     std::string arg2Str =
         arg2.dump(-1, ' ', true, nlohmann::json::error_handler_t::replace);
@@ -1775,8 +1782,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json propertyValueIncorrect(std::string_view arg1,
-                                      const nlohmann::json& arg2)
+nlohmann::json::object_t propertyValueIncorrect(std::string_view arg1,
+                                                const nlohmann::json& arg2)
 {
     std::string arg2Str =
         arg2.dump(-1, ' ', true, nlohmann::json::error_handler_t::replace);
@@ -1798,7 +1805,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json resourceCreationConflict(const boost::urls::url_view_base& arg1)
+nlohmann::json::object_t resourceCreationConflict(
+    const boost::urls::url_view_base& arg1)
 {
     return getLog(redfish::registries::Base::Index::resourceCreationConflict,
                   std::to_array<std::string_view>({arg1.buffer()}));
@@ -1818,8 +1826,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json actionParameterValueConflict(std::string_view arg1,
-                                            std::string_view arg2)
+nlohmann::json::object_t actionParameterValueConflict(std::string_view arg1,
+                                                      std::string_view arg2)
 {
     return getLog(
         redfish::registries::Base::Index::actionParameterValueConflict,
@@ -1841,7 +1849,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json maximumErrorsExceeded()
+nlohmann::json::object_t maximumErrorsExceeded()
 {
     return getLog(redfish::registries::Base::Index::maximumErrorsExceeded, {});
 }
@@ -1859,7 +1867,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json preconditionFailed()
+nlohmann::json::object_t preconditionFailed()
 {
     return getLog(redfish::registries::Base::Index::preconditionFailed, {});
 }
@@ -1877,7 +1885,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json preconditionRequired()
+nlohmann::json::object_t preconditionRequired()
 {
     return getLog(redfish::registries::Base::Index::preconditionRequired, {});
 }
@@ -1895,7 +1903,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json headerMissing(std::string_view arg1)
+nlohmann::json::object_t headerMissing(std::string_view arg1)
 {
     return getLog(redfish::registries::Base::Index::headerMissing,
                   std::to_array({arg1}));
@@ -1914,7 +1922,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json headerInvalid(std::string_view arg1)
+nlohmann::json::object_t headerInvalid(std::string_view arg1)
 {
     return getLog(redfish::registries::Base::Index::headerInvalid,
                   std::to_array({arg1}));
@@ -1933,7 +1941,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json operationFailed()
+nlohmann::json::object_t operationFailed()
 {
     return getLog(redfish::registries::Base::Index::operationFailed, {});
 }
@@ -1951,7 +1959,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json operationTimeout()
+nlohmann::json::object_t operationTimeout()
 {
     return getLog(redfish::registries::Base::Index::operationTimeout, {});
 }
@@ -1969,7 +1977,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json operationNotAllowed()
+nlohmann::json::object_t operationNotAllowed()
 {
     return getLog(redfish::registries::Base::Index::operationNotAllowed, {});
 }
@@ -1987,7 +1995,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json undeterminedFault(std::string_view arg1)
+nlohmann::json::object_t undeterminedFault(std::string_view arg1)
 {
     return getLog(redfish::registries::Base::Index::undeterminedFault,
                   std::to_array({arg1}));
@@ -2006,7 +2014,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json conditionInRelatedResource()
+nlohmann::json::object_t conditionInRelatedResource()
 {
     return getLog(redfish::registries::Base::Index::conditionInRelatedResource,
                   {});
@@ -2025,7 +2033,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json restrictedRole(std::string_view arg1)
+nlohmann::json::object_t restrictedRole(std::string_view arg1)
 {
     return getLog(redfish::registries::Base::Index::restrictedRole,
                   std::to_array({arg1}));
@@ -2044,7 +2052,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json restrictedPrivilege(std::string_view arg1)
+nlohmann::json::object_t restrictedPrivilege(std::string_view arg1)
 {
     return getLog(redfish::registries::Base::Index::restrictedPrivilege,
                   std::to_array({arg1}));
@@ -2063,7 +2071,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json strictAccountTypes(std::string_view arg1)
+nlohmann::json::object_t strictAccountTypes(std::string_view arg1)
 {
     return getLog(redfish::registries::Base::Index::strictAccountTypes,
                   std::to_array({arg1}));
@@ -2082,7 +2090,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json propertyDeprecated(std::string_view arg1)
+nlohmann::json::object_t propertyDeprecated(std::string_view arg1)
 {
     return getLog(redfish::registries::Base::Index::propertyDeprecated,
                   std::to_array({arg1}));
@@ -2101,7 +2109,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json resourceDeprecated(std::string_view arg1)
+nlohmann::json::object_t resourceDeprecated(std::string_view arg1)
 {
     return getLog(redfish::registries::Base::Index::resourceDeprecated,
                   std::to_array({arg1}));
@@ -2120,8 +2128,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json propertyValueDeprecated(std::string_view arg1,
-                                       std::string_view arg2)
+nlohmann::json::object_t propertyValueDeprecated(std::string_view arg1,
+                                                 std::string_view arg2)
 {
     return getLog(redfish::registries::Base::Index::propertyValueDeprecated,
                   std::to_array({arg1, arg2}));
@@ -2141,7 +2149,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json actionDeprecated(std::string_view arg1)
+nlohmann::json::object_t actionDeprecated(std::string_view arg1)
 {
     return getLog(redfish::registries::Base::Index::actionDeprecated,
                   std::to_array({arg1}));
@@ -2160,7 +2168,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json networkNameResolutionNotConfigured()
+nlohmann::json::object_t networkNameResolutionNotConfigured()
 {
     return getLog(
         redfish::registries::Base::Index::networkNameResolutionNotConfigured,
@@ -2180,7 +2188,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json networkNameResolutionNotSupported()
+nlohmann::json::object_t networkNameResolutionNotSupported()
 {
     return getLog(
         redfish::registries::Base::Index::networkNameResolutionNotSupported,
@@ -2200,7 +2208,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json serviceDisabled(std::string_view arg1)
+nlohmann::json::object_t serviceDisabled(std::string_view arg1)
 {
     return getLog(redfish::registries::Base::Index::serviceDisabled,
                   std::to_array({arg1}));
@@ -2219,7 +2227,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json eventBufferExceeded()
+nlohmann::json::object_t eventBufferExceeded()
 {
     return getLog(redfish::registries::Base::Index::eventBufferExceeded, {});
 }
@@ -2237,7 +2245,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json authenticationTokenRequired()
+nlohmann::json::object_t authenticationTokenRequired()
 {
     return getLog(redfish::registries::Base::Index::authenticationTokenRequired,
                   {});
@@ -2256,7 +2264,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json oneTimePasscodeSent(std::string_view arg1)
+nlohmann::json::object_t oneTimePasscodeSent(std::string_view arg1)
 {
     return getLog(redfish::registries::Base::Index::oneTimePasscodeSent,
                   std::to_array({arg1}));
@@ -2275,7 +2283,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json licenseRequired(std::string_view arg1)
+nlohmann::json::object_t licenseRequired(std::string_view arg1)
 {
     return getLog(redfish::registries::Base::Index::licenseRequired,
                   std::to_array({arg1}));
@@ -2294,7 +2302,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json propertyModified()
+nlohmann::json::object_t propertyModified()
 {
     return getLog(redfish::registries::Base::Index::propertyModified, {});
 }
@@ -2312,7 +2320,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json generateSecretKeyRequired(const boost::urls::url_view_base& arg1)
+nlohmann::json::object_t generateSecretKeyRequired(
+    const boost::urls::url_view_base& arg1)
 {
     return getLog(redfish::registries::Base::Index::generateSecretKeyRequired,
                   std::to_array<std::string_view>({arg1.buffer()}));
diff --git a/redfish-core/src/heartbeat_messages.cpp b/redfish-core/src/heartbeat_messages.cpp
index 2f9575e..28991dc 100644
--- a/redfish-core/src/heartbeat_messages.cpp
+++ b/redfish-core/src/heartbeat_messages.cpp
@@ -31,8 +31,9 @@
 namespace messages
 {
 
-static nlohmann::json getLog(redfish::registries::HeartbeatEvent::Index name,
-                             std::span<const std::string_view> args)
+static nlohmann::json::object_t getLog(
+    redfish::registries::HeartbeatEvent::Index name,
+    std::span<const std::string_view> args)
 {
     size_t index = static_cast<size_t>(name);
     if (index >= redfish::registries::HeartbeatEvent::registry.size())
@@ -51,7 +52,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json redfishServiceFunctional()
+nlohmann::json::object_t redfishServiceFunctional()
 {
     return getLog(
         redfish::registries::HeartbeatEvent::Index::redfishServiceFunctional,
diff --git a/redfish-core/src/resource_messages.cpp b/redfish-core/src/resource_messages.cpp
index 55fa8ee..17ef0c4 100644
--- a/redfish-core/src/resource_messages.cpp
+++ b/redfish-core/src/resource_messages.cpp
@@ -31,8 +31,9 @@
 namespace messages
 {
 
-static nlohmann::json getLog(redfish::registries::ResourceEvent::Index name,
-                             std::span<const std::string_view> args)
+static nlohmann::json::object_t getLog(
+    redfish::registries::ResourceEvent::Index name,
+    std::span<const std::string_view> args)
 {
     size_t index = static_cast<size_t>(name);
     if (index >= redfish::registries::ResourceEvent::registry.size())
@@ -51,7 +52,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json resourceCreated()
+nlohmann::json::object_t resourceCreated()
 {
     return getLog(redfish::registries::ResourceEvent::Index::resourceCreated,
                   {});
@@ -64,7 +65,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json resourceRemoved()
+nlohmann::json::object_t resourceRemoved()
 {
     return getLog(redfish::registries::ResourceEvent::Index::resourceRemoved,
                   {});
@@ -77,8 +78,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json resourceErrorsDetected(std::string_view arg1,
-                                      std::string_view arg2)
+nlohmann::json::object_t resourceErrorsDetected(std::string_view arg1,
+                                                std::string_view arg2)
 {
     return getLog(
         redfish::registries::ResourceEvent::Index::resourceErrorsDetected,
@@ -92,8 +93,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json resourceErrorsCorrected(std::string_view arg1,
-                                       std::string_view arg2)
+nlohmann::json::object_t resourceErrorsCorrected(std::string_view arg1,
+                                                 std::string_view arg2)
 {
     return getLog(
         redfish::registries::ResourceEvent::Index::resourceErrorsCorrected,
@@ -107,8 +108,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json resourceErrorThresholdExceeded(std::string_view arg1,
-                                              std::string_view arg2)
+nlohmann::json::object_t resourceErrorThresholdExceeded(std::string_view arg1,
+                                                        std::string_view arg2)
 {
     return getLog(redfish::registries::ResourceEvent::Index::
                       resourceErrorThresholdExceeded,
@@ -122,8 +123,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json resourceErrorThresholdCleared(std::string_view arg1,
-                                             std::string_view arg2)
+nlohmann::json::object_t resourceErrorThresholdCleared(std::string_view arg1,
+                                                       std::string_view arg2)
 {
     return getLog(redfish::registries::ResourceEvent::Index::
                       resourceErrorThresholdCleared,
@@ -137,8 +138,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json resourceWarningThresholdExceeded(std::string_view arg1,
-                                                std::string_view arg2)
+nlohmann::json::object_t resourceWarningThresholdExceeded(std::string_view arg1,
+                                                          std::string_view arg2)
 {
     return getLog(redfish::registries::ResourceEvent::Index::
                       resourceWarningThresholdExceeded,
@@ -152,8 +153,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json resourceWarningThresholdCleared(std::string_view arg1,
-                                               std::string_view arg2)
+nlohmann::json::object_t resourceWarningThresholdCleared(std::string_view arg1,
+                                                         std::string_view arg2)
 {
     return getLog(redfish::registries::ResourceEvent::Index::
                       resourceWarningThresholdCleared,
@@ -167,8 +168,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json resourceStatusChangedOK(std::string_view arg1,
-                                       std::string_view arg2)
+nlohmann::json::object_t resourceStatusChangedOK(std::string_view arg1,
+                                                 std::string_view arg2)
 {
     return getLog(
         redfish::registries::ResourceEvent::Index::resourceStatusChangedOK,
@@ -182,8 +183,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json resourceStatusChangedWarning(std::string_view arg1,
-                                            std::string_view arg2)
+nlohmann::json::object_t resourceStatusChangedWarning(std::string_view arg1,
+                                                      std::string_view arg2)
 {
     return getLog(
         redfish::registries::ResourceEvent::Index::resourceStatusChangedWarning,
@@ -197,8 +198,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json resourceStatusChangedCritical(std::string_view arg1,
-                                             std::string_view arg2)
+nlohmann::json::object_t resourceStatusChangedCritical(std::string_view arg1,
+                                                       std::string_view arg2)
 {
     return getLog(redfish::registries::ResourceEvent::Index::
                       resourceStatusChangedCritical,
@@ -212,8 +213,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json resourceStateChanged(std::string_view arg1,
-                                    std::string_view arg2)
+nlohmann::json::object_t resourceStateChanged(std::string_view arg1,
+                                              std::string_view arg2)
 {
     return getLog(
         redfish::registries::ResourceEvent::Index::resourceStateChanged,
@@ -227,7 +228,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json resourcePoweredOn(std::string_view arg1)
+nlohmann::json::object_t resourcePoweredOn(std::string_view arg1)
 {
     return getLog(redfish::registries::ResourceEvent::Index::resourcePoweredOn,
                   std::to_array({arg1}));
@@ -240,7 +241,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json resourcePoweringOn(std::string_view arg1)
+nlohmann::json::object_t resourcePoweringOn(std::string_view arg1)
 {
     return getLog(redfish::registries::ResourceEvent::Index::resourcePoweringOn,
                   std::to_array({arg1}));
@@ -253,7 +254,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json resourcePoweredOff(std::string_view arg1)
+nlohmann::json::object_t resourcePoweredOff(std::string_view arg1)
 {
     return getLog(redfish::registries::ResourceEvent::Index::resourcePoweredOff,
                   std::to_array({arg1}));
@@ -266,7 +267,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json resourcePoweringOff(std::string_view arg1)
+nlohmann::json::object_t resourcePoweringOff(std::string_view arg1)
 {
     return getLog(
         redfish::registries::ResourceEvent::Index::resourcePoweringOff,
@@ -280,7 +281,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json resourcePaused(std::string_view arg1)
+nlohmann::json::object_t resourcePaused(std::string_view arg1)
 {
     return getLog(redfish::registries::ResourceEvent::Index::resourcePaused,
                   std::to_array({arg1}));
@@ -293,7 +294,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json uRIForResourceChanged()
+nlohmann::json::object_t uRIForResourceChanged()
 {
     return getLog(
         redfish::registries::ResourceEvent::Index::uRIForResourceChanged, {});
@@ -306,7 +307,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json resourceChanged()
+nlohmann::json::object_t resourceChanged()
 {
     return getLog(redfish::registries::ResourceEvent::Index::resourceChanged,
                   {});
@@ -319,7 +320,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json resourceVersionIncompatible(std::string_view arg1)
+nlohmann::json::object_t resourceVersionIncompatible(std::string_view arg1)
 {
     return getLog(
         redfish::registries::ResourceEvent::Index::resourceVersionIncompatible,
@@ -333,7 +334,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json resourceSelfTestFailed(std::string_view arg1)
+nlohmann::json::object_t resourceSelfTestFailed(std::string_view arg1)
 {
     return getLog(
         redfish::registries::ResourceEvent::Index::resourceSelfTestFailed,
@@ -347,7 +348,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json resourceSelfTestCompleted()
+nlohmann::json::object_t resourceSelfTestCompleted()
 {
     return getLog(
         redfish::registries::ResourceEvent::Index::resourceSelfTestCompleted,
@@ -361,7 +362,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json testMessage()
+nlohmann::json::object_t testMessage()
 {
     return getLog(redfish::registries::ResourceEvent::Index::testMessage, {});
 }
@@ -373,8 +374,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json aggregationSourceDiscovered(std::string_view arg1,
-                                           std::string_view arg2)
+nlohmann::json::object_t aggregationSourceDiscovered(std::string_view arg1,
+                                                     std::string_view arg2)
 {
     return getLog(
         redfish::registries::ResourceEvent::Index::aggregationSourceDiscovered,
@@ -388,7 +389,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json licenseExpired(std::string_view arg1, std::string_view arg2)
+nlohmann::json::object_t licenseExpired(std::string_view arg1,
+                                        std::string_view arg2)
 {
     return getLog(redfish::registries::ResourceEvent::Index::licenseExpired,
                   std::to_array({arg1, arg2}));
@@ -401,7 +403,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json licenseChanged(std::string_view arg1, std::string_view arg2)
+nlohmann::json::object_t licenseChanged(std::string_view arg1,
+                                        std::string_view arg2)
 {
     return getLog(redfish::registries::ResourceEvent::Index::licenseChanged,
                   std::to_array({arg1, arg2}));
@@ -414,7 +417,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json licenseAdded(std::string_view arg1, std::string_view arg2)
+nlohmann::json::object_t licenseAdded(std::string_view arg1,
+                                      std::string_view arg2)
 {
     return getLog(redfish::registries::ResourceEvent::Index::licenseAdded,
                   std::to_array({arg1, arg2}));
diff --git a/redfish-core/src/task_messages.cpp b/redfish-core/src/task_messages.cpp
index 1521a4a..79c312a 100644
--- a/redfish-core/src/task_messages.cpp
+++ b/redfish-core/src/task_messages.cpp
@@ -33,8 +33,9 @@
 namespace messages
 {
 
-static nlohmann::json getLog(redfish::registries::TaskEvent::Index name,
-                             std::span<const std::string_view> args)
+static nlohmann::json::object_t getLog(
+    redfish::registries::TaskEvent::Index name,
+    std::span<const std::string_view> args)
 {
     size_t index = static_cast<size_t>(name);
     if (index >= redfish::registries::TaskEvent::registry.size())
@@ -53,7 +54,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json taskStarted(std::string_view arg1)
+nlohmann::json::object_t taskStarted(std::string_view arg1)
 {
     return getLog(redfish::registries::TaskEvent::Index::taskStarted,
                   std::to_array({arg1}));
@@ -66,7 +67,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json taskCompletedOK(std::string_view arg1)
+nlohmann::json::object_t taskCompletedOK(std::string_view arg1)
 {
     return getLog(redfish::registries::TaskEvent::Index::taskCompletedOK,
                   std::to_array({arg1}));
@@ -79,7 +80,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json taskCompletedWarning(std::string_view arg1)
+nlohmann::json::object_t taskCompletedWarning(std::string_view arg1)
 {
     return getLog(redfish::registries::TaskEvent::Index::taskCompletedWarning,
                   std::to_array({arg1}));
@@ -92,7 +93,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json taskAborted(std::string_view arg1)
+nlohmann::json::object_t taskAborted(std::string_view arg1)
 {
     return getLog(redfish::registries::TaskEvent::Index::taskAborted,
                   std::to_array({arg1}));
@@ -105,7 +106,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json taskCancelled(std::string_view arg1)
+nlohmann::json::object_t taskCancelled(std::string_view arg1)
 {
     return getLog(redfish::registries::TaskEvent::Index::taskCancelled,
                   std::to_array({arg1}));
@@ -118,7 +119,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json taskRemoved(std::string_view arg1)
+nlohmann::json::object_t taskRemoved(std::string_view arg1)
 {
     return getLog(redfish::registries::TaskEvent::Index::taskRemoved,
                   std::to_array({arg1}));
@@ -131,7 +132,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json taskPaused(std::string_view arg1)
+nlohmann::json::object_t taskPaused(std::string_view arg1)
 {
     return getLog(redfish::registries::TaskEvent::Index::taskPaused,
                   std::to_array({arg1}));
@@ -144,7 +145,7 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json taskResumed(std::string_view arg1)
+nlohmann::json::object_t taskResumed(std::string_view arg1)
 {
     return getLog(redfish::registries::TaskEvent::Index::taskResumed,
                   std::to_array({arg1}));
@@ -157,7 +158,8 @@
  * See header file for more information
  * @endinternal
  */
-nlohmann::json taskProgressChanged(std::string_view arg1, uint64_t arg2)
+nlohmann::json::object_t taskProgressChanged(std::string_view arg1,
+                                             uint64_t arg2)
 {
     std::string arg2Str = std::to_string(arg2);
     return getLog(redfish::registries::TaskEvent::Index::taskProgressChanged,