• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1  #include <iostream>
2  #include <nlohmann/json.hpp>
3  
4  using json = nlohmann::json;
5  
main()6  int main()
7  {
8      // create an array value
9      json array = {1, 2, 3, 4, 5};
10  
11      // get an iterator to the reverse-beginning
12      json::reverse_iterator it = array.rbegin();
13  
14      // serialize the element that the iterator points to
15      std::cout << *it << '\n';
16  }
17