Lines Matching full:json
2 // __| | __| | | | JSON for Modern C++ (supporting code)
4 // |_____|_____|_____|_|___| https://github.com/nlohmann/json
15 #include <nlohmann/json.hpp>
17 using nlohmann::json;
28 void to_json(json& /*unused*/, pod /*unused*/) noexcept;
29 void to_json(json& /*unused*/, pod_bis /*unused*/);
30 void from_json(const json& /*unused*/, pod /*unused*/) noexcept;
31 void from_json(const json& /*unused*/, pod_bis /*unused*/);
32 void to_json(json& /*unused*/, pod /*unused*/) noexcept {}
33 void to_json(json& /*unused*/, pod_bis /*unused*/) {}
34 void from_json(const json& /*unused*/, pod /*unused*/) noexcept {}
35 void from_json(const json& /*unused*/, pod_bis /*unused*/) {}
37 json* j = nullptr;
39 static_assert(noexcept(json{}), "");
46 static_assert(noexcept(json(2)), "");
47 static_assert(noexcept(json(test{})), "");
48 static_assert(noexcept(json(pod{})), "");
51 static_assert(noexcept(json(pod{})), "");
58 // for ERR60-CPP (https://github.com/nlohmann/json/issues/531):
63 CHECK(std::is_nothrow_copy_constructible<json::exception>::value == std::is_nothrow_copy_constructible<std::runtime_error>::value);
64 CHECK(std::is_nothrow_copy_constructible<json::parse_error>::value == std::is_nothrow_copy_constructible<std::runtime_error>::value);
65 CHECK(std::is_nothrow_copy_constructible<json::invalid_iterator>::value == std::is_nothrow_copy_constructible<std::runtime_error>::value);
66 CHECK(std::is_nothrow_copy_constructible<json::type_error>::value == std::is_nothrow_copy_constructible<std::runtime_error>::value);
67 CHECK(std::is_nothrow_copy_constructible<json::out_of_range>::value == std::is_nothrow_copy_constructible<std::runtime_error>::value);
68 CHECK(std::is_nothrow_copy_constructible<json::other_error>::value == std::is_nothrow_copy_constructible<std::runtime_error>::value);
74 json j2;