Template Function nlohmann::detail::hash

Function Documentation

template<typename BasicJsonType>
std::size_t nlohmann::detail::hash(const BasicJsonType &j)

hash a JSON value

The hash function tries to rely on std::hash where possible. Furthermore, the type of the JSON value is taken into account to have different hash values for null, 0, 0U, and false, etc.

Template Parameters:

BasicJsonTypebasic_json specialization

Parameters:

j – JSON value to hash

Returns:

hash value of j