basic_json__size_type_basic_json.cpp
Go to the documentation of this file.
00001 #include <json.hpp>
00002 
00003 using json = nlohmann::json;
00004 
00005 int main()
00006 {
00007     // create an array by creating copies of a JSON value
00008     json value = "Hello";
00009     json array_0 = json(0, value);
00010     json array_1 = json(1, value);
00011     json array_5 = json(5, value);
00012 
00013     // serialize the JSON arrays
00014     std::cout << array_0 << '\n';
00015     std::cout << array_1 << '\n';
00016     std::cout << array_5 << '\n';
00017 }


rc_visard_driver
Author(s): Heiko Hirschmueller , Christian Emmerich , Felix Ruess
autogenerated on Thu Jun 6 2019 20:43:01