Remove is_object
is_object doesn't throw, but generally is_object is used in some kind of
pattern of.
if (x.is_object()){
x["thing"];
}
operator[] technically throws if it's the wrong type, which bloats
binary sizes.
Replace these with the equivalent get_ptr<object_t>
Change-Id: If3734d7920f0a6f81efa10b3a2d91595e9e0af5a
Signed-off-by: Ed Tanous <etanous@nvidia.com>
diff --git a/redfish-core/include/sub_request.hpp b/redfish-core/include/sub_request.hpp
index df8cf70..c44644a 100644
--- a/redfish-core/include/sub_request.hpp
+++ b/redfish-core/include/sub_request.hpp
@@ -31,7 +31,7 @@
}
auto oemIt = reqJson.find("Oem");
- if (oemIt != reqJson.end() && oemIt->is_object())
+ if (oemIt != reqJson.end())
{
const nlohmann::json::object_t* oemObj =
oemIt->get_ptr<const nlohmann::json::object_t*>();