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;
101 json::serializer s(nlohmann::detail::output_adapter<char>(ss), ' ');
111 CHECK(std::string(json(json::value_t::null).type_name()) == "null");
112 CHECK(std::string(json(json::value_t::object).type_name()) == "object");
113 CHECK(std::string(json(json::value_t::array).type_name()) == "array");
114 CHECK(std::string(json(json::value_t::number_integer).type_name()) == "number");
115 CHECK(std::string(json(json::value_t::number_unsigned).type_name()) == "number");
116 CHECK(std::string(json(json::value_t::number_float).type_name()) == "number");
117 CHECK(std::string(json(json::value_t::binary).type_name()) == "binary");
118 CHECK(std::string(json(json::value_t::boolean).type_name()) == "boolean");
119 CHECK(std::string(json(json::value_t::string).type_name()) == "string");
120 CHECK(std::string(json(json::value_t::discarded).type_name()) == "discarded");
166 CHECK_THROWS_WITH_AS(check_escaped("ä\xA9ü"), "[json.exception.type_error.316] invalid UTF-8 byte at index 2: 0xA9", json::type_error&);
168 CHECK_THROWS_WITH_AS(check_escaped("\xC2"), "[json.exception.type_error.316] incomplete UTF-8 string; last byte: 0xC2", json::type_error&);