/third_party/json/tests/src/ |
D | unit-algorithms.cpp | 16 json j_array = {13, 29, 3, {{"one", 1}, {"two", 2}}, true, false, {1, 2, 3}, "foo", "baz"}; variable 23 CHECK(std::all_of(j_array.begin(), j_array.end(), [](const json & value) 35 CHECK(std::any_of(j_array.begin(), j_array.end(), [](const json & value) 47 CHECK(std::none_of(j_array.begin(), j_array.end(), [](const json & value) 63 std::for_each(j_array.cbegin(), j_array.cend(), [&sum](const json & value) 84 std::for_each(j_array.begin(), j_array.end(), add17); 86 CHECK(j_array[6] == json({1, 2, 3, 17})); 92 CHECK(std::count(j_array.begin(), j_array.end(), json(true)) == 1); 97 CHECK(std::count_if(j_array.begin(), j_array.end(), [](const json & value) 101 CHECK(std::count_if(j_array.begin(), j_array.end(), [](const json&) [all …]
|
D | unit-modifiers.cpp | 512 json j_array = {1, 2, 3, 4}; variable 519 auto it = j_array.insert(j_array.begin(), j_value); 520 CHECK(j_array.size() == 5); 522 CHECK(j_array.begin() == it); 523 CHECK(j_array == json({5, 1, 2, 3, 4})); 528 auto it = j_array.insert(j_array.begin() + 2, j_value); 529 CHECK(j_array.size() == 5); 531 CHECK((it - j_array.begin()) == 2); 532 CHECK(j_array == json({1, 2, 5, 3, 4})); 537 auto it = j_array.insert(j_array.end(), j_value); [all …]
|
D | unit-iterators2.cpp | 247 json j_array = {1, 2, 3, 4, 5, 6}; variable 308 auto it = j_array.begin(); 310 CHECK((j_array.begin() + 3) == it); 311 CHECK((3 + j_array.begin()) == it); 312 CHECK((it - 3) == j_array.begin()); 313 CHECK((it - j_array.begin()) == 3); 319 auto it = j_array.cbegin(); 321 CHECK((j_array.cbegin() + 3) == it); 322 CHECK((3 + j_array.cbegin()) == it); 323 CHECK((it - 3) == j_array.cbegin()); [all …]
|
/third_party/json/docs/examples/ |
D | dump.cpp | 10 json j_array = {1, 2, 4, 8, 16}; in main() local 22 << j_array.dump() << "\n\n" in main() 23 << j_array.dump(-1) << "\n\n" in main() 24 << j_array.dump(0) << "\n\n" in main() 25 << j_array.dump(4) << "\n\n" in main() 26 << j_array.dump(1, '\t') << "\n\n"; in main()
|
D | erase__IteratorType_IteratorType.cpp | 13 json j_array = {1, 2, 4, 8, 16}; in main() local 21 j_array.erase(j_array.begin() + 1, j_array.begin() + 3); in main() 29 std::cout << j_array << '\n'; in main()
|
D | erase__IteratorType.cpp | 13 json j_array = {1, 2, 4, 8, 16}; in main() local 21 j_array.erase(j_array.begin() + 2); in main() 29 std::cout << j_array << '\n'; in main()
|
D | erase__size_type.cpp | 9 json j_array = {0, 1, 2, 3, 4, 5}; in main() local 12 j_array.erase(2); in main() 15 std::cout << j_array << '\n'; in main()
|
D | operator_ltlt__basic_json.cpp | 11 json j_array = {1, 2, 4, 8, 16}; in main() local 15 std::cout << j_array << "\n\n"; in main() 19 std::cout << std::setw(2) << j_array << "\n\n"; in main()
|
D | basic_json__InputIt_InputIt.cpp | 9 json j_array = {"alpha", "bravo", "charly", "delta", "easy"}; in main() local 14 json j_array_range(j_array.begin() + 1, j_array.end() - 2); in main()
|
D | clear.cpp | 14 json j_array = {1, 2, 4, 8, 16}; in main() local 23 j_array.clear(); in main() 32 std::cout << j_array << '\n'; in main()
|
D | type_name.cpp | 15 json j_array = {1, 2, 4, 8, 16}; in main() local 25 std::cout << j_array << " is an " << j_array.type_name() << '\n'; in main()
|
D | items.cpp | 10 json j_array = {1, 2, 4, 8, 16}; in main() local 19 for (auto& x : j_array.items()) in main()
|
D | contains__object_t_key_type.cpp | 11 json j_array = R"( [1, 2, 3] )"_json; in main() local 17 "j_array contains 'key': " << j_array.contains("key") << std::endl; in main()
|
D | basic_json__list_init_t.cpp | 11 json j_array = {1, 2, 3, 4}; in main() local 18 std::cout << j_array << '\n'; in main()
|
D | contains__keytype.c++17.cpp | 13 json j_array = R"( [1, 2, 3] )"_json; in main() local 19 "j_array contains 'key': " << j_array.contains("key"sv) << std::endl; in main()
|
D | max_size.cpp | 14 json j_array = {1, 2, 4, 8, 16}; in main() local 23 std::cout << j_array.max_size() << '\n'; in main()
|
D | front.cpp | 15 json j_array = {1, 2, 4, 8, 16}; in main() local 26 std::cout << j_array.front() << '\n'; in main()
|
D | back.cpp | 14 json j_array = {1, 2, 4, 8, 16}; in main() local 24 std::cout << j_array.back() << '\n'; in main()
|
D | basic_json__value_t.cpp | 14 json j_array(json::value_t::array); in main() local 23 std::cout << j_array << '\n'; in main()
|
D | is_boolean.cpp | 15 json j_array = {1, 2, 4, 8, 16}; in main() local 27 std::cout << j_array.is_boolean() << '\n'; in main()
|
D | is_primitive.cpp | 15 json j_array = {1, 2, 4, 8, 16}; in main() local 27 std::cout << j_array.is_primitive() << '\n'; in main()
|
D | is_number.cpp | 15 json j_array = {1, 2, 4, 8, 16}; in main() local 27 std::cout << j_array.is_number() << '\n'; in main()
|
D | is_number_unsigned.cpp | 15 json j_array = {1, 2, 4, 8, 16}; in main() local 27 std::cout << j_array.is_number_unsigned() << '\n'; in main()
|
D | is_discarded.cpp | 15 json j_array = {1, 2, 4, 8, 16}; in main() local 27 std::cout << j_array.is_discarded() << '\n'; in main()
|
D | is_null.cpp | 15 json j_array = {1, 2, 4, 8, 16}; in main() local 27 std::cout << j_array.is_null() << '\n'; in main()
|