1#include <iostream> 2#include <nlohmann/json.hpp> 3 4using json = nlohmann::json; 5 6int main() 7{ 8 // different JSON Pointers 9 json::json_pointer ptr1("/foo"); 10 json::json_pointer ptr2("/foo/0"); 11 12 // call empty() 13 std::cout << "last reference token of \"" << ptr1 << "\" is \"" << ptr1.back() << "\"\n" 14 << "last reference token of \"" << ptr2 << "\" is \"" << ptr2.back() << "\"" << std::endl; 15} 16