]>
git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentelemetry-cpp/third_party/nlohmann-json/doc/examples/cbegin.cpp
2 #include <nlohmann/json.hpp>
4 using json
= nlohmann::json
;
8 // create an array value
9 const json array
= {1, 2, 3, 4, 5};
11 // get an iterator to the first element
12 json::const_iterator it
= array
.cbegin();
14 // serialize the element that the iterator points to
15 std::cout
<< *it
<< '\n';