Searched hist:d91415c4 (Results 1 – 1 of 1) sorted by relevance
/openbmc/bmcweb/redfish-core/include/utils/ |
H A D | json_utils.hpp | d91415c4 Fri Feb 03 14:23:46 CST 2023 Ed Tanous <edtanous@google.com> Change readJson from is_object to get_ptr
While is_object is useful in contexts where we don't need the underlying value, in cases where we do, nlohmann::json::begin() can throw when generating the nlohmann::iterator_proxy object. This causes unwind tables to be generated, so as a general rule, we should be prefering get_ptr in these cases.
Tested: Good unit test coverage for readJson. Unit tests only.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I5ecb2dca95cc06246e983f9e4190b2dd46d1a6b9
|