This commit is contained in:
George Kasparyants 2018-02-01 02:11:11 +00:00 committed by GitHub
commit 94d39856e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17123,6 +17123,18 @@ inline nlohmann::json operator "" _json(const char* s, std::size_t n)
return nlohmann::json::parse(s, s + n);
}
/*!
@brief user-defined to_string function for JSON values
This function implements a user-defined to_string for JSON objects.
@param[in] j a JSON object
@return a std::string object
*/
inline std::string to_string(const nlohmann::json& j) {
return j.dump();
}
/*!
@brief user-defined string literal for JSON pointer