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/include/task_messages.hpp b/redfish-core/include/task_messages.hpp
index 48bbc68..a901de7 100644
--- a/redfish-core/include/task_messages.hpp
+++ b/redfish-core/include/task_messages.hpp
@@ -27,23 +27,24 @@
namespace messages
{
-nlohmann::json taskStarted(std::string_view arg1);
+nlohmann::json::object_t taskStarted(std::string_view arg1);
-nlohmann::json taskCompletedOK(std::string_view arg1);
+nlohmann::json::object_t taskCompletedOK(std::string_view arg1);
-nlohmann::json taskCompletedWarning(std::string_view arg1);
+nlohmann::json::object_t taskCompletedWarning(std::string_view arg1);
-nlohmann::json taskAborted(std::string_view arg1);
+nlohmann::json::object_t taskAborted(std::string_view arg1);
-nlohmann::json taskCancelled(std::string_view arg1);
+nlohmann::json::object_t taskCancelled(std::string_view arg1);
-nlohmann::json taskRemoved(std::string_view arg1);
+nlohmann::json::object_t taskRemoved(std::string_view arg1);
-nlohmann::json taskPaused(std::string_view arg1);
+nlohmann::json::object_t taskPaused(std::string_view arg1);
-nlohmann::json taskResumed(std::string_view arg1);
+nlohmann::json::object_t taskResumed(std::string_view arg1);
-nlohmann::json taskProgressChanged(std::string_view arg1, uint64_t arg2);
+nlohmann::json::object_t taskProgressChanged(std::string_view arg1,
+ uint64_t arg2);
} // namespace messages
} // namespace redfish