nlohmann::basic_json::size

returns the number of elements

Synopsis

Declared in <nlohmann/json.hpp>

size_type
size() const noexcept;

Return Value

the number of elements (0 for null, the array/object size for arrays and objects, 1 for all other types)