You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
314 B

  1. #include <json.hpp>
  2. using json = nlohmann::json;
  3. int main()
  4. {
  5. // create an array value
  6. json array = {1, 2, 3, 4, 5};
  7. // get an iterator to the reverse-beginning
  8. json::reverse_iterator it = array.rbegin();
  9. // serialize the element that the iterator points to
  10. std::cout << *it << '\n';
  11. }