1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
| std::vector<int> c_vector {1, 2, 3, 4}; json j_vec(c_vector);
std::deque<double> c_deque {1.2, 2.3, 3.4, 5.6}; json j_deque(c_deque);
std::list<bool> c_list {true, true, false, true}; json j_list(c_list);
std::forward_list<int64_t> c_flist {12345678909876, 23456789098765, 34567890987654, 45678909876543}; json j_flist(c_flist);
std::array<unsigned long, 4> c_array {{1, 2, 3, 4}}; json j_array(c_array);
std::set<std::string> c_set {"one", "two", "three", "four", "one"}; json j_set(c_set);
std::unordered_set<std::string> c_uset {"one", "two", "three", "four", "one"}; json j_uset(c_uset);
std::multiset<std::string> c_mset {"one", "two", "one", "four"}; json j_mset(c_mset);
std::unordered_multiset<std::string> c_umset {"one", "two", "one", "four"}; json j_umset(c_umset);
std::map<std::string, int> c_map { {"one", 1}, {"two", 2}, {"three", 3} }; json j_map(c_map);
std::unordered_map<const char*, double> c_umap { {"one", 1.2}, {"two", 2.3}, {"three", 3.4} }; json j_umap(c_umap);
std::multimap<std::string, bool> c_mmap { {"one", true}, {"two", true}, {"three", false}, {"three", true} }; json j_mmap(c_mmap);
std::unordered_multimap<std::string, bool> c_ummap { {"one", true}, {"two", true}, {"three", false}, {"three", true} }; json j_ummap(c_ummap);
|