JSON for Modern C++  3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups
std::hash< nlohmann::json > Struct Template Reference

hash value for JSON objects More...

#include <json.hpp>

Collaboration diagram for std::hash< nlohmann::json >:

Public Member Functions

size_t operator() (const nlohmann::json &j) const
 return a hash value for a JSON object More...
 

Detailed Description

template<>
struct std::hash< nlohmann::json >

Definition at line 4706 of file json.hpp.

Member Function Documentation

size_t std::hash< nlohmann::json >::operator() ( const nlohmann::json j) const
inline

Definition at line 4709 of file json.hpp.

References nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberFloatType, Allocator >::dump().

4710  {
4711  // a naive hashing via the string representation
4712  const auto& h = hash<nlohmann::json::string_t>();
4713  return h(j.dump());
4714  }
string_t dump(const int indent=-1) const noexcept
serialization
Definition: json.hpp:756

Here is the call graph for this function:


The documentation for this struct was generated from the following file: