Lines Matching full:json
2 // __| | __| | | | JSON for Modern C++ (supporting code)
4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json
12 #include <nlohmann/json.hpp>
13 using nlohmann::json;
23 json j(json::value_t::null);
24 json::const_iterator it(&j);
29 json j(json::value_t::object);
30 json::const_iterator it(&j);
35 json j(json::value_t::array);
36 json::const_iterator it(&j);
42 json j(json::value_t::null);
43 json::const_iterator it(&j);
44 json::const_iterator it2(&j);
52 const json::iterator it {};
53 json::const_iterator cit(it);
58 json j;
59 const json::iterator it = j.begin();
60 json::const_iterator cit(it);
71 json j(json::value_t::null);
72 json::const_iterator it(&j);
79 json j(json::value_t::object);
80 json::const_iterator it(&j);
87 json j(json::value_t::array);
88 json::const_iterator it(&j);
98 json j(json::value_t::null);
99 json::const_iterator it(&j);
106 json j(json::value_t::object);
107 json::const_iterator it(&j);
114 json j(json::value_t::array);
115 json::const_iterator it(&j);
128 json j(json::value_t::null);
129 json::const_iterator it = j.cbegin();
130 CHECK_THROWS_WITH_AS(*it, "[json.exception.invalid_iterator.214] cannot get value", json::invalid_iterator&);
135 json j(17);
136 json::const_iterator it = j.cbegin();
137 CHECK(*it == json(17));
139 CHECK_THROWS_WITH_AS(*it, "[json.exception.invalid_iterator.214] cannot get value", json::invalid_iterator&);
144 json j({{"foo", "bar"}});
145 json::const_iterator it = j.cbegin();
146 CHECK(*it == json("bar"));
151 json j({1, 2, 3, 4});
152 json::const_iterator it = j.cbegin();
153 CHECK(*it == json(1));
161 json j(json::value_t::null);
162 json::const_iterator it = j.cbegin();
163 CHECK_THROWS_WITH_AS(std::string(it->type_name()), "[json.exception.invalid_iterator.214] cannot get value", json::invalid_iterator&);
168 json j(17);
169 json::const_iterator it = j.cbegin();
172 CHECK_THROWS_WITH_AS(std::string(it->type_name()), "[json.exception.invalid_iterator.214] cannot get value", json::invalid_iterator&);
177 json j({{"foo", "bar"}});
178 json::const_iterator it = j.cbegin();
184 json j({1, 2, 3, 4});
185 json::const_iterator it = j.cbegin();
197 json j(json::value_t::null);
198 json::const_iterator it = j.cbegin();
206 json j(17);
207 json::const_iterator it = j.cbegin();
217 json j({{"foo", "bar"}});
218 json::const_iterator it = j.cbegin();
226 json j({1, 2, 3, 4});
227 json::const_iterator it = j.cbegin();
248 json j(json::value_t::null);
249 json::const_iterator it = j.cbegin();
257 json j(17);
258 json::const_iterator it = j.cbegin();
268 json j({{"foo", "bar"}});
269 json::const_iterator it = j.cbegin();
277 json j({1, 2, 3, 4});
278 json::const_iterator it = j.cbegin();
299 json j(json::value_t::null);
300 json::const_iterator it = j.cend();
306 json j(17);
307 json::const_iterator it = j.cend();
317 json j({{"foo", "bar"}});
318 json::const_iterator it = j.cend();
326 json j({1, 2, 3, 4});
327 json::const_iterator it = j.cend();
348 json j(json::value_t::null);
349 json::const_iterator it = j.cend();
355 json j(17);
356 json::const_iterator it = j.cend();
366 json j({{"foo", "bar"}});
367 json::const_iterator it = j.cend();
375 json j({1, 2, 3, 4});
376 json::const_iterator it = j.cend();