1 #include <iostream> 2 #include <nlohmann/json.hpp> 3 4 using json = nlohmann::json; 5 main()6int main() 7 { 8 // different JSON Pointers 9 json::json_pointer ptr1("/foo/0"); 10 json::json_pointer ptr2("/a~1b"); 11 12 // implicit conversion to string 13 std::string s; 14 s += ptr1; 15 s += "\n"; 16 s += ptr2; 17 18 std::cout << s << std::endl; 19 } 20