All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
std::hash< nlohmann::json > Struct Template Reference

hash value for JSON objects More...

#include <json.hpp>

Public Member Functions

std::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 >

hash value for JSON objects

Definition at line 22636 of file json.hpp.

Member Function Documentation

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

return a hash value for a JSON object

Since
version 1.0.0

Definition at line 22643 of file json.hpp.

22644  {
22645  // a naive hashing via the string representation
22646  const auto& h = hash<nlohmann::json::string_t>();
22647  return h(j.dump());
22648  }
while getopts h
string_t dump(const int indent=-1, const char indent_char= ' ', const bool ensure_ascii=false, const error_handler_t error_handler=error_handler_t::strict) const
serialization
Definition: json.hpp:16560

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