2 #include <nlohmann/json.hpp>
4 using json
= nlohmann::json
;
8 // create an array value
9 json array
= {1, 2, 3, 4, 5};
11 // get an iterator to the reverse-end
12 json::const_reverse_iterator it
= array
.crend();
14 // increment the iterator to point to the first element
17 // serialize the element that the iterator points to
18 std::cout
<< *it
<< '\n';