]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentelemetry-cpp/third_party/nlohmann-json/doc/examples/operatorarray__key_type_const.cpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / third_party / nlohmann-json / doc / examples / operatorarray__key_type_const.cpp
1 #include <iostream>
2 #include <nlohmann/json.hpp>
3
4 using json = nlohmann::json;
5
6 int main()
7 {
8 // create a JSON object
9 const json object =
10 {
11 {"one", 1}, {"two", 2}, {"three", 2.9}
12 };
13
14 // output element with key "two"
15 std::cout << object["two"] << '\n';
16 }