summaryrefslogtreecommitdiff
path: root/redfish-core/include/utils/json_utils.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'redfish-core/include/utils/json_utils.hpp')
-rw-r--r--redfish-core/include/utils/json_utils.hpp30
1 files changed, 20 insertions, 10 deletions
diff --git a/redfish-core/include/utils/json_utils.hpp b/redfish-core/include/utils/json_utils.hpp
index 25ac95417d..bde81ce72d 100644
--- a/redfish-core/include/utils/json_utils.hpp
+++ b/redfish-core/include/utils/json_utils.hpp
@@ -14,26 +14,36 @@
// limitations under the License.
*/
#pragma once
-#include <nlohmann/json.hpp>
#include <crow/http_request.h>
#include <crow/http_response.h>
-namespace redfish {
+#include <nlohmann/json.hpp>
+
+namespace redfish
+{
-namespace json_util {
+namespace json_util
+{
/**
* @brief Defines JSON utils operation status
*/
-enum class Result { SUCCESS, NOT_EXIST, WRONG_TYPE, NULL_POINTER };
+enum class Result
+{
+ SUCCESS,
+ NOT_EXIST,
+ WRONG_TYPE,
+ NULL_POINTER
+};
/**
* @brief Describes JSON utils messages requirement
*/
-enum class MessageSetting {
- NONE = 0x0, ///< No messages will be added
- MISSING = 0x1, ///< PropertyMissing message will be added
- TYPE_ERROR = 0x2 ///< PropertyValueTypeError message will be added
+enum class MessageSetting
+{
+ NONE = 0x0, ///< No messages will be added
+ MISSING = 0x1, ///< PropertyMissing message will be added
+ TYPE_ERROR = 0x2 ///< PropertyValueTypeError message will be added
};
/**
@@ -287,6 +297,6 @@ Result getDouble(const char* fieldName, const nlohmann::json& json,
bool processJsonFromRequest(crow::Response& res, const crow::Request& req,
nlohmann::json& reqJson);
-} // namespace json_util
+} // namespace json_util
-} // namespace redfish
+} // namespace redfish