]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentelemetry-cpp/third_party/nlohmann-json/doc/examples/json_pointer__back.cpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / third_party / nlohmann-json / doc / examples / json_pointer__back.cpp
1 #include <iostream>
2 #include <nlohmann/json.hpp>
3
4 using json = nlohmann::json;
5
6 int 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 }