00001 #include <json.hpp> 00002 00003 using json = nlohmann::json; 00004 00005 int main() 00006 { 00007 // create an array value 00008 const json array = {1, 2, 3, 4, 5}; 00009 00010 // get am iterator to the first element 00011 json::const_iterator it = array.cbegin(); 00012 00013 // serialize the element that the iterator points to 00014 std::cout << *it << '\n'; 00015 }