JSON for Modern C++  3.5.0

◆ to_string()

template<typename BasicJsonType >
std::string nlohmann::json_pointer< BasicJsonType >::to_string ( ) const
inline
Invariant
For each JSON pointer ptr, it holds:
ptr == json_pointer(ptr.to_string());
Returns
a string representation of the JSON pointer
Example^^ The example shows the result of to_string. ^^
json_pointer__to_string.cpp Output (play with this example online):^^
/foo
/foo/0
/
/a~1b
/c%d
/e^f
/g|h
/i\j
/k"l
/ 
/m~0n
^^ The <a href= https://github.com/nlohmann/json/blob/develop/doc/examples/ json_pointer__to_string.cpp>example code above can be translated with
g++ -std=c++11 -Isingle_include doc/examples/
json_pointer__to_string.cpp -o 
json_pointer__to_string 
Since
version 2.0.0

Definition at line 11768 of file json.hpp.