diff --git a/include/nlohmann/json.hpp b/include/nlohmann/json.hpp index f698163fe..8cf3f8397 100644 --- a/include/nlohmann/json.hpp +++ b/include/nlohmann/json.hpp @@ -633,6 +633,14 @@ private: return v.m_data.m_value.array->empty(); case value_t::object: return v.m_data.m_value.object->empty(); + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: default: return true; } diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index b6e5ca7c5..9a1aaeecd 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -27872,6 +27872,14 @@ private: return v.m_data.m_value.array->empty(); case value_t::object: return v.m_data.m_value.object->empty(); + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: default: return true; }