]>
git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentelemetry-cpp/third_party/nlohmann-json/doc/examples/insert__range_object.cpp
2 #include <nlohmann/json.hpp>
4 using json
= nlohmann::json
;
8 // create two JSON objects
9 json j1
= {{"one", "eins"}, {"two", "zwei"}};
10 json j2
= {{"eleven", "elf"}, {"seventeen", "siebzehn"}};
13 std::cout
<< j1
<< '\n';
14 std::cout
<< j2
<< '\n';
16 // insert range from j2 to j1
17 j1
.insert(j2
.begin(), j2
.end());
19 // output result of insert call
20 std::cout
<< j1
<< '\n';