]> git.proxmox.com Git - ceph.git/blame - ceph/src/jaegertracing/opentelemetry-cpp/third_party/nlohmann-json/doc/examples/begin.cpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / third_party / nlohmann-json / doc / examples / begin.cpp
CommitLineData
1e59de90
TL
1#include <iostream>
2#include <nlohmann/json.hpp>
3
4using json = nlohmann::json;
5
6int main()
7{
8 // create an array value
9 json array = {1, 2, 3, 4, 5};
10
11 // get an iterator to the first element
12 json::iterator it = array.begin();
13
14 // serialize the element that the iterator points to
15 std::cout << *it << '\n';
16}