xref: /third_party/json/docs/examples/operator_ltlt__json_pointer.cpp
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/json/docs/examples/
1c5f01b2fSopenharmony_ci#include <iostream>
2c5f01b2fSopenharmony_ci#include <nlohmann/json.hpp>
3c5f01b2fSopenharmony_ci
4c5f01b2fSopenharmony_ciusing json = nlohmann::json;
5c5f01b2fSopenharmony_ci
6c5f01b2fSopenharmony_ciint main()
7c5f01b2fSopenharmony_ci{
8c5f01b2fSopenharmony_ci    // create JSON poiner
9c5f01b2fSopenharmony_ci    json::json_pointer ptr("/foo/bar/baz");
10c5f01b2fSopenharmony_ci
11c5f01b2fSopenharmony_ci    // write string representation to stream
12c5f01b2fSopenharmony_ci    std::cout << ptr << std::endl;
13c5f01b2fSopenharmony_ci}
14

Indexes created Thu Nov 07 10:32:03 CST 2024