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;
29 json j(json::value_t::null);
30 json::iterator it(&j);
35 json j(json::value_t::object);
36 json::iterator it(&j);
41 json j(json::value_t::array);
42 json::iterator it(&j);
48 json j(json::value_t::null);
49 json::iterator it(&j);
50 json::iterator it2(&j);
61 json j(json::value_t::null);
62 json::iterator it(&j);
69 json j(json::value_t::object);
70 json::iterator it(&j);
77 json j(json::value_t::array);
78 json::iterator it(&j);
88 json j(json::value_t::null);
89 json::iterator it(&j);
96 json j(json::value_t::object);
97 json::iterator it(&j);
104 json j(json::value_t::array);
105 json::iterator it(&j);
118 json j(json::value_t::null);
119 json::iterator it = j.begin();
120 CHECK_THROWS_WITH_AS(*it, "[json.exception.invalid_iterator.214] cannot get value", json::invalid_iterator&);
125 json j(17);
126 json::iterator it = j.begin();
127 CHECK(*it == json(17));
129 CHECK_THROWS_WITH_AS(*it, "[json.exception.invalid_iterator.214] cannot get value", json::invalid_iterator&);
134 json j({{"foo", "bar"}});
135 json::iterator it = j.begin();
136 CHECK(*it == json("bar"));
141 json j({1, 2, 3, 4});
142 json::iterator it = j.begin();
143 CHECK(*it == json(1));
151 json j(json::value_t::null);
152 json::iterator it = j.begin();
153 CHECK_THROWS_WITH_AS(std::string(it->type_name()), "[json.exception.invalid_iterator.214] cannot get value", json::invalid_iterator&);
158 json j(17);
159 json::iterator it = j.begin();
162 CHECK_THROWS_WITH_AS(std::string(it->type_name()), "[json.exception.invalid_iterator.214] cannot get value", json::invalid_iterator&);
167 json j({{"foo", "bar"}});
168 json::iterator it = j.begin();
174 json j({1, 2, 3, 4});
175 json::iterator it = j.begin();
187 json j(json::value_t::null);
188 json::iterator it = j.begin();
196 json j(17);
197 json::iterator it = j.begin();
207 json j({{"foo", "bar"}});
208 json::iterator it = j.begin();
216 json j({1, 2, 3, 4});
217 json::iterator it = j.begin();
238 json j(json::value_t::null);
239 json::iterator it = j.begin();
247 json j(17);
248 json::iterator it = j.begin();
258 json j({{"foo", "bar"}});
259 json::iterator it = j.begin();
267 json j({1, 2, 3, 4});
268 json::iterator it = j.begin();
289 json j(json::value_t::null);
290 json::iterator it = j.end();
296 json j(17);
297 json::iterator it = j.end();
307 json j({{"foo", "bar"}});
308 json::iterator it = j.end();
316 json j({1, 2, 3, 4});
317 json::iterator it = j.end();
338 json j(json::value_t::null);
339 json::iterator it = j.end();
345 json j(17);
346 json::iterator it = j.end();
356 json j({{"foo", "bar"}});
357 json::iterator it = j.end();
365 json j({1, 2, 3, 4});
366 json::iterator it = j.end();
394 using Iter = nlohmann::detail::iter_impl<json>;
399 using Base = nlohmann::detail::iter_impl<json>;
413 using Iter = nlohmann::detail::iter_impl<json>;
418 using Base = nlohmann::detail::iter_impl<json>;
437 using Iter = nlohmann::detail::iter_impl<json>;
442 using Base = nlohmann::detail::iter_impl<json>;
456 using Iter = nlohmann::detail::iter_impl<json>;
461 using Base = nlohmann::detail::iter_impl<json>;