]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentelemetry-cpp/third_party/nlohmann-json/doc/examples/json_pointer__push_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__push_back.cpp
1 #include <iostream>
2 #include <nlohmann/json.hpp>
3
4 using json = nlohmann::json;
5
6 int main()
7 {
8 // create empty JSON Pointer
9 json::json_pointer ptr;
10 std::cout << ptr << '\n';
11
12 // call push_back()
13 ptr.push_back("foo");
14 std::cout << ptr << '\n';
15
16 ptr.push_back("0");
17 std::cout << ptr << '\n';
18
19 ptr.push_back("bar");
20 std::cout << ptr << '\n';
21 }