Lines Matching defs:nlohmann

4 // |_____|_____|_____|_|___|  https://github.com/nlohmann/json
6 // SPDX-FileCopyrightText: 2013-2022 Niels Lohmann <https://nlohmann.me>
22 #include <nlohmann/json.hpp>
23 using json = nlohmann::json;
24 using ordered_json = nlohmann::ordered_json;
26 using namespace nlohmann::literals; // NOLINT(google-build-using-namespace)
51 using float_json = nlohmann::basic_json<std::map, std::vector, std::string, bool, std::int64_t, std::uint64_t, float>;
113 namespace nlohmann
123 } // namespace nlohmann
147 namespace nlohmann
157 } // namespace nlohmann
163 class sax_no_exception : public nlohmann::detail::json_sax_dom_parser<json>
167 : nlohmann::detail::json_sax_dom_parser<json>(j, false)
213 inline void from_json(const nlohmann::json& j, FooBar& fb)
410 json diffs = nlohmann::json::array();
476 auto s = dump_test.dump(-1, ' ', true, nlohmann::json::error_handler_t::replace);
493 auto s = dump_test.dump(-1, ' ', false, nlohmann::json::error_handler_t::replace);
498 nlohmann::json dump_test;
509 dump_test.dump(-1, ' ', true, nlohmann::json::error_handler_t::replace);
549 auto val = nlohmann::json("one").get<for_1647>();
611 // see https://github.com/nlohmann/json/pull/2181#issuecomment-653326060
639 nlohmann::ordered_json jsonAnimals = {{"animal", "dog"}};
640 nlohmann::ordered_json jsonCat = {{"animal", "cat"}};
644 auto jsonAnimals_parsed = nlohmann::ordered_json::parse(jsonAnimals.dump());
650 nlohmann::ordered_json jsonObj;
749 nlohmann::json o;
752 nlohmann::to_json(o["foo"], s);
754 nlohmann::json p = o;
757 nlohmann::to_json(p["foo"], s);
761 nlohmann::json o;
764 nlohmann::to_json(o["foo"], s);
767 nlohmann::to_json(o["foo"], s);
783 static_assert(std::is_copy_assignable<nlohmann::ordered_json>::value, "ordered_json must be copy assignable");
818 nlohmann::detail::std_fs::path text_path("/tmp/text.txt");
821 const auto j_path = j.get<nlohmann::detail::std_fs::path>();
826 CHECK_THROWS_WITH_AS(nlohmann::detail::std_fs::path(json(1)), "[json.exception.type_error.302] type must be string, but is number", json::type_error);
872 // failed with: error: no match for ‘operator=’ (operand types are ‘for_3171_derived’ and ‘const nlohmann::basic_json<>::string_t’
894 SECTION("issue #3428 - Error occurred when converting nlohmann::json to std::any")
914 SECTION("issue #3333 - Ambiguous conversion from nlohmann::basic_json<> to custom class")