summaryrefslogtreecommitdiff
path: root/redfish-core/include/utils/json_utils.hpp
diff options
context:
space:
mode:
authorEd Tanous <ed.tanous@intel.com>2018-09-05 18:30:59 +0300
committerEd Tanous <ed.tanous@intel.com>2018-09-05 18:44:12 +0300
commit1abe55ef9844afcddcab9d862ae06118f3a2390c (patch)
treed0b5fcfd0b1cd679a8995af3eb0b6d31b368380e /redfish-core/include/utils/json_utils.hpp
parenta38b0b206300c792979b900f506b85e535f5708a (diff)
downloadbmcweb-1abe55ef9844afcddcab9d862ae06118f3a2390c.tar.xz
Move to clang-format-6.0
This commit moves the codebase to the lastest clang-format file from upstream, as well as clang-format-6.0. Change-Id: Ice8313468097c0c42317fbb9e10ddf036e8cff4c Signed-off-by: Ed Tanous <ed.tanous@intel.com>
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