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;
42 bool number_integer(json::number_integer_t /*unused*/) in number_integer()
47 bool number_unsigned(json::number_unsigned_t /*unused*/) in number_unsigned()
52 bool number_float(json::number_float_t /*unused*/, const std::string& /*unused*/) in number_float()
92 …bool parse_error(std::size_t /*unused*/, const std::string& /*unused*/, const json::exception& /*u… in parse_error()
215 …nlohmann::detail::binary_reader<json, decltype(ia)> const br{std::move(ia), json::input_format_t::…
226 json const j = json::value_t::discarded;
227 const auto result = json::to_bjdata(j);
233 json const j = nullptr;
235 const auto result = json::to_bjdata(j);
239 CHECK(json::from_bjdata(result) == j);
240 CHECK(json::from_bjdata(result, true, false) == j);
247 json const j = true;
249 const auto result = json::to_bjdata(j);
253 CHECK(json::from_bjdata(result) == j);
254 CHECK(json::from_bjdata(result, true, false) == j);
259 json const j = false;
261 const auto result = json::to_bjdata(j);
265 CHECK(json::from_bjdata(result) == j);
266 CHECK(json::from_bjdata(result, true, false) == j);
294 // create JSON value with integer number
295 json const j = i;
315 const auto result = json::to_bjdata(j);
332 CHECK(json::from_bjdata(result) == j);
333 CHECK(json::from_bjdata(result, true, false) == j);
353 // create JSON value with integer number
354 json const j = i;
370 const auto result = json::to_bjdata(j);
383 CHECK(json::from_bjdata(result) == j);
384 CHECK(json::from_bjdata(result, true, false) == j);
394 // create JSON value with integer number
395 json const j = i;
409 const auto result = json::to_bjdata(j);
419 CHECK(json::from_bjdata(result) == j);
420 CHECK(json::from_bjdata(result, true, false) == j);
426 json const j = -9263;
430 const auto result = json::to_bjdata(j);
440 CHECK(json::from_bjdata(result) == j);
441 CHECK(json::from_bjdata(result, true, false) == j);
450 // create JSON value with integer number
451 json const j = i;
464 const auto result = json::to_bjdata(j);
473 CHECK(json::from_bjdata(result) == j);
474 CHECK(json::from_bjdata(result, true, false) == j);
484 // create JSON value with integer number
485 json j = -1;
486 … j.get_ref<json::number_integer_t&>() = static_cast<json::number_integer_t>(i);
499 const auto result = json::to_bjdata(j);
508 CHECK(json::from_bjdata(result) == j);
509 CHECK(json::from_bjdata(result, true, false) == j);
519 // create JSON value with integer number
520 json j = -1;
521 … j.get_ref<json::number_integer_t&>() = static_cast<json::number_integer_t>(i);
534 const auto result = json::to_bjdata(j);
543 CHECK(json::from_bjdata(result) == j);
544 CHECK(json::from_bjdata(result, true, false) == j);
554 // create JSON value with integer number
555 json j = -1;
556 … j.get_ref<json::number_integer_t&>() = static_cast<json::number_integer_t>(i);
570 const auto result = json::to_bjdata(j);
580 CHECK(json::from_bjdata(result) == j);
581 CHECK(json::from_bjdata(result, true, false) == j);
594 // create JSON value with integer number
595 json j = -1;
596 … j.get_ref<json::number_integer_t&>() = static_cast<json::number_integer_t>(i);
610 const auto result = json::to_bjdata(j);
620 CHECK(json::from_bjdata(result) == j);
621 CHECK(json::from_bjdata(result, true, false) == j);
634 // create JSON value with integer number
635 json j = -1;
636 … j.get_ref<json::number_integer_t&>() = static_cast<json::number_integer_t>(i);
652 const auto result = json::to_bjdata(j);
665 CHECK(json::from_bjdata(result) == j);
666 CHECK(json::from_bjdata(result, true, false) == j);
679 // create JSON value with integer number
680 json j = -1;
681 … j.get_ref<json::number_integer_t&>() = static_cast<json::number_integer_t>(i);
697 const auto result = json::to_bjdata(j);
710 CHECK(json::from_bjdata(result) == j);
711 CHECK(json::from_bjdata(result, true, false) == j);
722 // create JSON value with integer number
723 json j = -1;
724 … j.get_ref<json::number_integer_t&>() = static_cast<json::number_integer_t>(i);
744 const auto result = json::to_bjdata(j);
761 CHECK(json::from_bjdata(result) == j);
762 CHECK(json::from_bjdata(result, true, false) == j);
773 // create JSON value with integer number
774 json const j = i;
794 const auto result = json::to_bjdata(j);
811 CHECK(json::from_bjdata(result) == j);
812 CHECK(json::from_bjdata(result, true, false) == j);
825 // create JSON value with unsigned integer number
826 json const j = i;
835 const auto result = json::to_bjdata(j);
845 CHECK(json::from_bjdata(result) == j);
846 CHECK(json::from_bjdata(result, true, false) == j);
856 // create JSON value with unsigned integer number
857 json const j = i;
866 const auto result = json::to_bjdata(j);
876 CHECK(json::from_bjdata(result) == j);
877 CHECK(json::from_bjdata(result, true, false) == j);
887 // create JSON value with unsigned integer number
888 json const j = i;
902 const auto result = json::to_bjdata(j);
912 CHECK(json::from_bjdata(result) == j);
913 CHECK(json::from_bjdata(result, true, false) == j);
926 // create JSON value with unsigned integer number
927 json const j = i;
941 const auto result = json::to_bjdata(j);
951 CHECK(json::from_bjdata(result) == j);
952 CHECK(json::from_bjdata(result, true, false) == j);
964 // create JSON value with unsigned integer number
965 json const j = i;
981 const auto result = json::to_bjdata(j);
994 CHECK(json::from_bjdata(result) == j);
995 CHECK(json::from_bjdata(result, true, false) == j);
1008 // create JSON value with unsigned integer number
1009 json const j = i;
1025 const auto result = json::to_bjdata(j);
1038 CHECK(json::from_bjdata(result) == j);
1039 CHECK(json::from_bjdata(result, true, false) == j);
1050 // create JSON value with integer number
1051 json const j = i;
1071 const auto result = json::to_bjdata(j);
1088 CHECK(json::from_bjdata(result) == j);
1089 CHECK(json::from_bjdata(result, true, false) == j);
1100 // create JSON value with integer number
1101 json const j = i;
1121 const auto result = json::to_bjdata(j);
1138 CHECK(json::from_bjdata(result) == j);
1139 CHECK(json::from_bjdata(result, true, false) == j);
1148 json const j = v;
1153 const auto result = json::to_bjdata(j);
1157 CHECK(json::from_bjdata(result) == j);
1158 CHECK(json::from_bjdata(result) == v);
1159 CHECK(json::from_bjdata(result, true, false) == j);
1167 … CHECK(json::parse("0.0") == json::from_bjdata(std::vector<uint8_t>({'h', 0x00, 0x00})));
1168 … CHECK(json::parse("-0.0") == json::from_bjdata(std::vector<uint8_t>({'h', 0x00, 0x80})));
1169 … CHECK(json::parse("1.0") == json::from_bjdata(std::vector<uint8_t>({'h', 0x00, 0x3c})));
1170 … CHECK(json::parse("1.5") == json::from_bjdata(std::vector<uint8_t>({'h', 0x00, 0x3e})));
1171 … CHECK(json::parse("65504.0") == json::from_bjdata(std::vector<uint8_t>({'h', 0xff, 0x7b})));
1178 json _;
1180 …json::from_bjdata(vec0), "[json.exception.parse_error.110] parse error at byte 2: syntax error whi…
1181 CHECK(json::from_bjdata(vec0, true, false).is_discarded());
1186 json _;
1188 …json::from_bjdata(vec1), "[json.exception.parse_error.110] parse error at byte 3: syntax error whi…
1189 CHECK(json::from_bjdata(vec1, true, false).is_discarded());
1200 json const j = json::from_bjdata(std::vector<uint8_t>({'h', 0x00, 0x00}));
1201 json::number_float_t d{j};
1207 json const j = json::from_bjdata(std::vector<uint8_t>({'h', 0x00, 0x80}));
1208 json::number_float_t d{j};
1214 json const j = json::from_bjdata(std::vector<uint8_t>({'h', 0x01, 0x00}));
1215 json::number_float_t d{j};
1224 json const j = json::from_bjdata(std::vector<uint8_t>({'h', 0x00, 0x7c}));
1225 json::number_float_t d{j};
1226 CHECK(d == std::numeric_limits<json::number_float_t>::infinity());
1232 json const j = json::from_bjdata(std::vector<uint8_t>({'h', 0x00, 0xfc}));
1233 json::number_float_t d{j};
1234 CHECK(d == -std::numeric_limits<json::number_float_t>::infinity());
1243 json const j = json::from_bjdata(std::vector<uint8_t>({'h', 0x00, 0x3c}));
1244 json::number_float_t d{j};
1250 json const j = json::from_bjdata(std::vector<uint8_t>({'h', 0x00, 0xc0}));
1251 json::number_float_t d{j};
1257 json const j = json::from_bjdata(std::vector<uint8_t>({'h', 0xff, 0x7b}));
1258 json::number_float_t d{j};
1265 json const j = json::from_bjdata(std::vector<uint8_t>({'h', 0x00, 0x7c}));
1266 json::number_float_t const d{j};
1273 json const j = json::from_bjdata(std::vector<uint8_t>({'h', 0x00, 0x7e }));
1274 json::number_float_t const d{j};
1285 const auto j = json::from_bjdata(vec);
1293 const auto j = json::from_bjdata(vec);
1301 const auto j = json::from_bjdata(vec);
1310 CHECK(json::from_bjdata(vec0, true, false).is_discarded());
1313 CHECK(json::from_bjdata(vec1, true, false).is_discarded());
1315 json _;
1317 …json::from_bjdata(vec2), "[json.exception.parse_error.115] parse error at byte 5: syntax error whi…
1319 …json::from_bjdata(vec3), "[json.exception.parse_error.115] parse error at byte 5: syntax error whi…
1321 …json::from_bjdata(vec4), "[json.exception.parse_error.113] parse error at byte 2: syntax error whi…
1334 // create JSON value with string containing of N * 'x'
1336 json const j = s;
1349 const auto result = json::to_bjdata(j);
1359 CHECK(json::from_bjdata(result) == j);
1360 CHECK(json::from_bjdata(result, true, false) == j);
1370 // create JSON value with string containing of N * 'x'
1372 json const j = s;
1385 const auto result = json::to_bjdata(j);
1392 CHECK(json::from_bjdata(result) == j);
1393 CHECK(json::from_bjdata(result, true, false) == j);
1406 // create JSON value with string containing of N * 'x'
1408 json const j = s;
1419 const auto result = json::to_bjdata(j);
1426 CHECK(json::from_bjdata(result) == j);
1427 CHECK(json::from_bjdata(result, true, false) == j);
1440 // create JSON value with string containing of N * 'x'
1442 json const j = s;
1453 const auto result = json::to_bjdata(j);
1460 CHECK(json::from_bjdata(result) == j);
1461 CHECK(json::from_bjdata(result, true, false) == j);
1474 // create JSON value with string containing of N * 'x'
1476 json const j = s;
1489 const auto result = json::to_bjdata(j);
1496 CHECK(json::from_bjdata(result) == j);
1497 CHECK(json::from_bjdata(result, true, false) == j);
1510 // create JSON value with byte array containing of N * 'x'
1512 json const j = json::binary(s);
1531 const auto result = json::to_bjdata(j, true, true);
1549 json j_out = s;
1550 CHECK(json::from_bjdata(result) == j_out);
1551 CHECK(json::from_bjdata(result, true, false) == j_out);
1561 // create JSON value with byte array containing of N * 'x'
1563 json const j = json::binary(s);
1579 const auto result = json::to_bjdata(j, true, true);
1586 json j_out = s;
1587 CHECK(json::from_bjdata(result) == j_out);
1588 CHECK(json::from_bjdata(result, true, false) == j_out);
1601 // create JSON value with byte array containing of N * 'x'
1603 json const j = json::binary(s);
1616 const auto result = json::to_bjdata(j, true, true);
1623 json j_out = s;
1624 CHECK(json::from_bjdata(result) == j_out);
1625 CHECK(json::from_bjdata(result, true, false) == j_out);
1638 // create JSON value with byte array containing of N * 'x'
1640 json const j = json::binary(s);
1653 const auto result = json::to_bjdata(j, true, true);
1660 json j_out = s;
1661 CHECK(json::from_bjdata(result) == j_out);
1662 CHECK(json::from_bjdata(result, true, false) == j_out);
1675 // create JSON value with byte array containing of N * 'x'
1677 json const j = json::binary(s);
1692 const auto result = json::to_bjdata(j, true, true);
1699 json j_out = s;
1700 CHECK(json::from_bjdata(result) == j_out);
1701 CHECK(json::from_bjdata(result, true, false) == j_out);
1709 json const j = json::binary(s);
1723 const auto result = json::to_bjdata(j, false, false);
1730 json j_out = s;
1731 CHECK(json::from_bjdata(result) == j_out);
1732 CHECK(json::from_bjdata(result, true, false) == j_out);
1750 const auto result = json::to_bjdata(j, true, false);
1757 json j_out = s;
1758 CHECK(json::from_bjdata(result) == j_out);
1759 CHECK(json::from_bjdata(result, true, false) == j_out);
1769 json const j = json::array();
1771 const auto result = json::to_bjdata(j);
1775 CHECK(json::from_bjdata(result) == j);
1776 CHECK(json::from_bjdata(result, true, false) == j);
1781 json const j = json::array();
1783 const auto result = json::to_bjdata(j, true);
1787 CHECK(json::from_bjdata(result) == j);
1788 CHECK(json::from_bjdata(result, true, false) == j);
1793 json const j = json::array();
1795 const auto result = json::to_bjdata(j, true, true);
1799 CHECK(json::from_bjdata(result) == j);
1800 CHECK(json::from_bjdata(result, true, false) == j);
1808 json const j = {nullptr};
1810 const auto result = json::to_bjdata(j);
1814 CHECK(json::from_bjdata(result) == j);
1815 CHECK(json::from_bjdata(result, true, false) == j);
1820 json const j = {nullptr};
1822 const auto result = json::to_bjdata(j, true);
1826 CHECK(json::from_bjdata(result) == j);
1827 CHECK(json::from_bjdata(result, true, false) == j);
1832 json const j = {nullptr};
1834 const auto result = json::to_bjdata(j, true, true);
1838 CHECK(json::from_bjdata(result) == j);
1839 CHECK(json::from_bjdata(result, true, false) == j);
1847 json const j = json::parse("[1,2,3,4,5]");
1849 const auto result = json::to_bjdata(j);
1853 CHECK(json::from_bjdata(result) == j);
1854 CHECK(json::from_bjdata(result, true, false) == j);
1859 json const j = json::parse("[1,2,3,4,5]");
1861 const auto result = json::to_bjdata(j, true);
1865 CHECK(json::from_bjdata(result) == j);
1866 CHECK(json::from_bjdata(result, true, false) == j);
1871 json const j = json::parse("[1,2,3,4,5]");
1873 const auto result = json::to_bjdata(j, true, true);
1877 CHECK(json::from_bjdata(result) == j);
1878 CHECK(json::from_bjdata(result, true, false) == j);
1886 json const j = json::parse("[[[[]]]]");
1888 const auto result = json::to_bjdata(j);
1892 CHECK(json::from_bjdata(result) == j);
1893 CHECK(json::from_bjdata(result, true, false) == j);
1898 json const j = json::parse("[[[[]]]]");
1900 const auto result = json::to_bjdata(j, true);
1904 CHECK(json::from_bjdata(result) == j);
1905 CHECK(json::from_bjdata(result, true, false) == j);
1910 json const j = json::parse("[[[[]]]]");
1912 const auto result = json::to_bjdata(j, true, true);
1916 CHECK(json::from_bjdata(result) == j);
1917 CHECK(json::from_bjdata(result, true, false) == j);
1925 json j(257, nullptr);
1929 const auto result = json::to_bjdata(j);
1933 CHECK(json::from_bjdata(result) == j);
1934 CHECK(json::from_bjdata(result, true, false) == j);
1939 json j(257, nullptr);
1946 const auto result = json::to_bjdata(j, true);
1950 CHECK(json::from_bjdata(result) == j);
1951 CHECK(json::from_bjdata(result, true, false) == j);
1959 json j(32768, nullptr);
1963 const auto result = json::to_bjdata(j);
1967 CHECK(json::from_bjdata(result) == j);
1968 CHECK(json::from_bjdata(result, true, false) == j);
1973 json j(32768, nullptr);
1980 const auto result = json::to_bjdata(j, true);
1984 CHECK(json::from_bjdata(result) == j);
1985 CHECK(json::from_bjdata(result, true, false) == j);
1993 json j(65793, nullptr);
1997 const auto result = json::to_bjdata(j);
2001 CHECK(json::from_bjdata(result) == j);
2002 CHECK(json::from_bjdata(result, true, false) == j);
2007 json j(65793, nullptr);
2016 const auto result = json::to_bjdata(j, true);
2020 CHECK(json::from_bjdata(result) == j);
2021 CHECK(json::from_bjdata(result, true, false) == j);
2032 json const j = json::object();
2034 const auto result = json::to_bjdata(j);
2038 CHECK(json::from_bjdata(result) == j);
2039 CHECK(json::from_bjdata(result, true, false) == j);
2044 json const j = json::object();
2046 const auto result = json::to_bjdata(j, true);
2050 CHECK(json::from_bjdata(result) == j);
2051 CHECK(json::from_bjdata(result, true, false) == j);
2056 json const j = json::object();
2058 const auto result = json::to_bjdata(j, true, true);
2062 CHECK(json::from_bjdata(result) == j);
2063 CHECK(json::from_bjdata(result, true, false) == j);
2071 json const j = {{"", nullptr}};
2073 const auto result = json::to_bjdata(j);
2077 CHECK(json::from_bjdata(result) == j);
2078 CHECK(json::from_bjdata(result, true, false) == j);
2083 json const j = {{"", nullptr}};
2085 const auto result = json::to_bjdata(j, true);
2089 CHECK(json::from_bjdata(result) == j);
2090 CHECK(json::from_bjdata(result, true, false) == j);
2098 json const j = json::parse(R"({"a": {"b": {"c": {}}}})");
2103 const auto result = json::to_bjdata(j);
2107 CHECK(json::from_bjdata(result) == j);
2108 CHECK(json::from_bjdata(result, true, false) == j);
2113 json const j = json::parse(R"({"a": {"b": {"c": {}}}})");
2118 const auto result = json::to_bjdata(j, true);
2122 CHECK(json::from_bjdata(result) == j);
2123 CHECK(json::from_bjdata(result, true, false) == j);
2128 json const j = json::parse(R"({"a": {"b": {"c": {}}}})");
2133 const auto result = json::to_bjdata(j, true, true);
2137 CHECK(json::from_bjdata(result) == j);
2138 CHECK(json::from_bjdata(result, true, false) == j);
2151 const auto result = json::from_bjdata(vec, false);
2152 CHECK(result == json());
2157 json _;
2158 CHECK_THROWS_WITH_AS(_ = json::from_bjdata(vec),
2159 …"[json.exception.parse_error.110] parse error at byte 2: syntax error while parsing BJData value: …
2170 CHECK_FALSE(json::sax_parse(v, &scp, json::input_format_t::bjdata));
2177 CHECK_FALSE(json::sax_parse(v, &scp, json::input_format_t::bjdata));
2184 CHECK_FALSE(json::sax_parse(v, &scp, json::input_format_t::bjdata));
2191 CHECK_FALSE(json::sax_parse(v, &scp, json::input_format_t::bjdata));
2198 CHECK_FALSE(json::sax_parse(v, &scp, json::input_format_t::bjdata));
2205 CHECK_FALSE(json::sax_parse(v, &scp, json::input_format_t::bjdata));
2212 CHECK_FALSE(json::sax_parse(v, &scp, json::input_format_t::bjdata));
2219 CHECK_FALSE(json::sax_parse(v, &scp, json::input_format_t::bjdata));
2226 CHECK_FALSE(json::sax_parse(v, &scp, json::input_format_t::bjdata));
2233 CHECK_FALSE(json::sax_parse(v, &scp, json::input_format_t::bjdata));
2240 CHECK_FALSE(json::sax_parse(v, &scp, json::input_format_t::bjdata));
2247 CHECK_FALSE(json::sax_parse(v, &scp, json::input_format_t::bjdata));
2254 CHECK_FALSE(json::sax_parse(v, &scp, json::input_format_t::bjdata));
2261 CHECK_FALSE(json::sax_parse(v, &scp, json::input_format_t::bjdata));
2280 CHECK(json::from_bjdata(s_i) == "a");
2281 CHECK(json::from_bjdata(s_U) == "a");
2282 CHECK(json::from_bjdata(s_I) == "a");
2283 CHECK(json::from_bjdata(s_u) == "a");
2284 CHECK(json::from_bjdata(s_l) == "a");
2285 CHECK(json::from_bjdata(s_m) == "a");
2286 CHECK(json::from_bjdata(s_L) == "a");
2287 CHECK(json::from_bjdata(s_M) == "a");
2290 CHECK(json::to_bjdata(json::from_bjdata(s_i)) == s_i);
2291 CHECK(json::to_bjdata(json::from_bjdata(s_U)) == s_i);
2292 CHECK(json::to_bjdata(json::from_bjdata(s_I)) == s_i);
2293 CHECK(json::to_bjdata(json::from_bjdata(s_u)) == s_i);
2294 CHECK(json::to_bjdata(json::from_bjdata(s_l)) == s_i);
2295 CHECK(json::to_bjdata(json::from_bjdata(s_m)) == s_i);
2296 CHECK(json::to_bjdata(json::from_bjdata(s_L)) == s_i);
2297 CHECK(json::to_bjdata(json::from_bjdata(s_M)) == s_i);
2306 CHECK(json::from_bjdata(v_d) == 3.14159f);
2310 CHECK(json::from_bjdata(v_D) == 3.14159);
2313 CHECK(json::to_bjdata(json::from_bjdata(v_d)) == json::to_bjdata(3.14159f));
2339 CHECK(json::from_bjdata(v_TU) == json({true, true}));
2340 CHECK(json::from_bjdata(v_T) == json({true, true}));
2341 CHECK(json::from_bjdata(v_F) == json({false, false}));
2342 CHECK(json::from_bjdata(v_Z) == json({nullptr, nullptr}));
2343 CHECK(json::from_bjdata(v_i) == json({127, 127}));
2344 CHECK(json::from_bjdata(v_U) == json({255, 255}));
2345 CHECK(json::from_bjdata(v_I) == json({32767, 32767}));
2346 CHECK(json::from_bjdata(v_u) == json({42767, 42767}));
2347 CHECK(json::from_bjdata(v_l) == json({2147483647, 2147483647}));
2348 CHECK(json::from_bjdata(v_m) == json({3147483647, 3147483647}));
2349 CHECK(json::from_bjdata(v_L) == json({9223372036854775807, 9223372036854775807}));
2350 … CHECK(json::from_bjdata(v_M) == json({10223372036854775807ull, 10223372036854775807ull}));
2351 CHECK(json::from_bjdata(v_D) == json({3.1415926, 3.1415926}));
2352 CHECK(json::from_bjdata(v_S) == json({"a", "a"}));
2353 CHECK(json::from_bjdata(v_C) == json({"a", "a"}));
2356 CHECK(json::to_bjdata(json::from_bjdata(v_T), true) == v_T);
2357 CHECK(json::to_bjdata(json::from_bjdata(v_F), true) == v_F);
2358 CHECK(json::to_bjdata(json::from_bjdata(v_Z), true) == v_Z);
2359 CHECK(json::to_bjdata(json::from_bjdata(v_i), true) == v_i);
2360 CHECK(json::to_bjdata(json::from_bjdata(v_U), true) == v_U);
2361 CHECK(json::to_bjdata(json::from_bjdata(v_I), true) == v_I);
2362 CHECK(json::to_bjdata(json::from_bjdata(v_u), true) == v_u);
2363 CHECK(json::to_bjdata(json::from_bjdata(v_l), true) == v_l);
2364 CHECK(json::to_bjdata(json::from_bjdata(v_m), true) == v_m);
2365 CHECK(json::to_bjdata(json::from_bjdata(v_L), true) == v_L);
2366 CHECK(json::to_bjdata(json::from_bjdata(v_M), true) == v_M);
2367 CHECK(json::to_bjdata(json::from_bjdata(v_D), true) == v_D);
2368 CHECK(json::to_bjdata(json::from_bjdata(v_S), true) == v_S);
2369 … CHECK(json::to_bjdata(json::from_bjdata(v_C), true) == v_S); // char is serialized to string
2388 CHECK(json::from_bjdata(v_i) == json({127, 127}));
2389 CHECK(json::from_bjdata(v_U) == json({255, 255}));
2390 CHECK(json::from_bjdata(v_I) == json({32767, 32767}));
2391 CHECK(json::from_bjdata(v_u) == json({42767, 42767}));
2392 CHECK(json::from_bjdata(v_l) == json({2147483647, 2147483647}));
2393 CHECK(json::from_bjdata(v_m) == json({3147483647, 3147483647}));
2394 CHECK(json::from_bjdata(v_L) == json({9223372036854775807, 9223372036854775807}));
2395 … CHECK(json::from_bjdata(v_M) == json({10223372036854775807ull, 10223372036854775807ull}));
2396 CHECK(json::from_bjdata(v_D) == json({3.1415926, 3.1415926}));
2397 CHECK(json::from_bjdata(v_S) == json({"a", "a"}));
2398 CHECK(json::from_bjdata(v_C) == json({"a", "a"}));
2402 CHECK(json::to_bjdata(json::from_bjdata(v_i), true, true) == v_i);
2403 CHECK(json::to_bjdata(json::from_bjdata(v_U), true, true) == v_U);
2404 CHECK(json::to_bjdata(json::from_bjdata(v_I), true, true) == v_I);
2405 CHECK(json::to_bjdata(json::from_bjdata(v_u), true, true) == v_u);
2406 CHECK(json::to_bjdata(json::from_bjdata(v_l), true, true) == v_l);
2407 CHECK(json::to_bjdata(json::from_bjdata(v_m), true, true) == v_m);
2408 CHECK(json::to_bjdata(json::from_bjdata(v_L), true, true) == v_L);
2409 CHECK(json::to_bjdata(json::from_bjdata(v_M), true, true) == v_M);
2410 CHECK(json::to_bjdata(json::from_bjdata(v_D), true, true) == v_D);
2411 CHECK(json::to_bjdata(json::from_bjdata(v_S), true, true) == v_S);
2412 … CHECK(json::to_bjdata(json::from_bjdata(v_C), true, true) == v_S); // char is serialized to string
2433 CHECK(json::from_bjdata(v_0) == json::array());
2434 CHECK(json::from_bjdata(v_1) == json({127, 127}));
2435 CHECK(json::from_bjdata(v_i) == json({127, 127}));
2436 CHECK(json::from_bjdata(v_U) == json({255, 255}));
2437 CHECK(json::from_bjdata(v_I) == json({32767, 32767}));
2438 CHECK(json::from_bjdata(v_u) == json({42767, 42767}));
2439 CHECK(json::from_bjdata(v_l) == json({2147483647, 2147483647}));
2440 CHECK(json::from_bjdata(v_m) == json({3147483647, 3147483647}));
2441 CHECK(json::from_bjdata(v_L) == json({9223372036854775807, 9223372036854775807}));
2442 … CHECK(json::from_bjdata(v_M) == json({10223372036854775807ull, 10223372036854775807ull}));
2443 CHECK(json::from_bjdata(v_D) == json({3.1415926, 3.1415926}));
2444 CHECK(json::from_bjdata(v_S) == json({"a", "a"}));
2445 CHECK(json::from_bjdata(v_C) == json({"a", "a"}));
2465 …CHECK(json::from_bjdata(v_e) == json({{"_ArrayData_", {254, 255}}, {"_ArraySize_", {2, 1}}, {"_Arr…
2466 …CHECK(json::from_bjdata(v_U) == json({{"_ArrayData_", {1, 2, 3, 4, 5, 6}}, {"_ArraySize_", {2, 3}}…
2467 …CHECK(json::from_bjdata(v_i) == json({{"_ArrayData_", {1, 2, 3, 4, 5, 6}}, {"_ArraySize_", {2, 3}}…
2468 …CHECK(json::from_bjdata(v_i) == json({{"_ArrayData_", {1, 2, 3, 4, 5, 6}}, {"_ArraySize_", {2, 3}}…
2469 …CHECK(json::from_bjdata(v_u) == json({{"_ArrayData_", {1, 2, 3, 4, 5, 6}}, {"_ArraySize_", {2, 3}}…
2470 …CHECK(json::from_bjdata(v_I) == json({{"_ArrayData_", {1, 2, 3, 4, 5, 6}}, {"_ArraySize_", {2, 3}}…
2471 …CHECK(json::from_bjdata(v_m) == json({{"_ArrayData_", {1, 2, 3, 4, 5, 6}}, {"_ArraySize_", {2, 3}}…
2472 …CHECK(json::from_bjdata(v_l) == json({{"_ArrayData_", {1, 2, 3, 4, 5, 6}}, {"_ArraySize_", {2, 3}}…
2473 …CHECK(json::from_bjdata(v_M) == json({{"_ArrayData_", {1, 2, 3, 4, 5, 6}}, {"_ArraySize_", {2, 3}}…
2474 …CHECK(json::from_bjdata(v_L) == json({{"_ArrayData_", {1, 2, 3, 4, 5, 6}}, {"_ArraySize_", {2, 3}}…
2475 …CHECK(json::from_bjdata(v_d) == json({{"_ArrayData_", {1.f, 2.f, 3.f, 4.f, 5.f, 6.f}}, {"_ArraySiz…
2476 …CHECK(json::from_bjdata(v_D) == json({{"_ArrayData_", {1., 2., 3., 4., 5., 6.}}, {"_ArraySize_", {…
2477 …CHECK(json::from_bjdata(v_C) == json({{"_ArrayData_", {'a', 'b', 'c', 'd', 'e', 'f'}}, {"_ArraySiz…
2480 CHECK(json::to_bjdata(json::from_bjdata(v_e), true, true) == v_e);
2481 CHECK(json::to_bjdata(json::from_bjdata(v_U), true, true) == v_U);
2482 CHECK(json::to_bjdata(json::from_bjdata(v_i), true, true) == v_i);
2483 CHECK(json::to_bjdata(json::from_bjdata(v_u), true, true) == v_u);
2484 CHECK(json::to_bjdata(json::from_bjdata(v_I), true, true) == v_I);
2485 CHECK(json::to_bjdata(json::from_bjdata(v_m), true, true) == v_m);
2486 CHECK(json::to_bjdata(json::from_bjdata(v_l), true, true) == v_l);
2487 CHECK(json::to_bjdata(json::from_bjdata(v_M), true, true) == v_M);
2488 CHECK(json::to_bjdata(json::from_bjdata(v_L), true, true) == v_L);
2489 CHECK(json::to_bjdata(json::from_bjdata(v_d), true, true) == v_d);
2490 CHECK(json::to_bjdata(json::from_bjdata(v_D), true, true) == v_D);
2491 CHECK(json::to_bjdata(json::from_bjdata(v_C), true, true) == v_C);
2513 CHECK(json::from_bjdata(v_0) == json::array());
2514 CHECK(json::from_bjdata(v_E) == json::array());
2515 CHECK(json::from_bjdata(v_i) == json({127, 127}));
2516 CHECK(json::from_bjdata(v_U) == json({255, 255}));
2517 CHECK(json::from_bjdata(v_I) == json({32767, 32767}));
2518 CHECK(json::from_bjdata(v_u) == json({42767, 42767}));
2519 CHECK(json::from_bjdata(v_l) == json({2147483647, 2147483647}));
2520 CHECK(json::from_bjdata(v_m) == json({3147483647, 3147483647}));
2521 CHECK(json::from_bjdata(v_L) == json({9223372036854775807, 9223372036854775807}));
2522 … CHECK(json::from_bjdata(v_M) == json({10223372036854775807ull, 10223372036854775807ull}));
2523 CHECK(json::from_bjdata(v_D) == json({3.1415926, 3.1415926}));
2524 CHECK(json::from_bjdata(v_S) == json({"a", "a"}));
2525 CHECK(json::from_bjdata(v_C) == json({"a", "a"}));
2526 CHECK(json::from_bjdata(v_R) == json({6, 7}));
2545 CHECK(json::from_bjdata(v_i) == json({127, 127}));
2546 CHECK(json::from_bjdata(v_U) == json({255, 255}));
2547 CHECK(json::from_bjdata(v_I) == json({32767, 32767}));
2548 CHECK(json::from_bjdata(v_u) == json({42767, 42767}));
2549 CHECK(json::from_bjdata(v_l) == json({2147483647, 2147483647}));
2550 CHECK(json::from_bjdata(v_m) == json({3147483647, 3147483647}));
2551 CHECK(json::from_bjdata(v_L) == json({9223372036854775807, 9223372036854775807}));
2552 … CHECK(json::from_bjdata(v_M) == json({10223372036854775807ull, 10223372036854775807ull}));
2553 CHECK(json::from_bjdata(v_D) == json({3.1415926, 3.1415926}));
2554 CHECK(json::from_bjdata(v_S) == json({"a", "a"}));
2555 CHECK(json::from_bjdata(v_C) == json({"a", "a"}));
2561 …json j_type = json({{"_ArrayData_", {1, 2, 3, 4, 5, 6}}, {"_ArraySize_", {2, 3}}, {"_ArrayType_", …
2562 …json j_size = json({{"_ArrayData_", {1, 2, 3, 4, 5}}, {"_ArraySize_", {2, 3}}, {"_ArrayType_", "ui…
2565 CHECK(json::from_bjdata(json::to_bjdata(j_type), true, true) == j_type);
2566 CHECK(json::from_bjdata(json::to_bjdata(j_size), true, true) == j_size);
2575 json _;
2576 CHECK_THROWS_WITH_AS(_ = json::from_bjdata(std::vector<uint8_t>()),
2577 …"[json.exception.parse_error.110] parse error at byte 1: syntax error while parsing BJData value: …
2585 json _;
2586 …= json::from_bjdata(v), "[json.exception.parse_error.110] parse error at byte 2: syntax error whil…
2592 json _;
2593 …CHECK_THROWS_WITH(_ = json::from_bjdata(v), "[json.exception.parse_error.113] parse error at byte …
2602 json _;
2603 … json::from_bjdata(v), "[json.exception.parse_error.110] parse error at byte 2: syntax error while…
2609 json _;
2610 …json::from_bjdata(v), "[json.exception.parse_error.113] parse error at byte 2: syntax error while …
2620 json _;
2622 …json::from_ubjson(s_u), "[json.exception.parse_error.113] parse error at byte 2: syntax error whil…
2623 …json::from_ubjson(s_m), "[json.exception.parse_error.113] parse error at byte 2: syntax error whil…
2624 …json::from_ubjson(s_M), "[json.exception.parse_error.113] parse error at byte 2: syntax error whil…
2633 json _;
2634 …json::from_bjdata(v), "[json.exception.parse_error.112] parse error at byte 4: syntax error while …
2652 json _;
2653 …json::from_bjdata(v1), "[json.exception.parse_error.113] parse error at byte 4: syntax error while…
2654 CHECK(json::from_bjdata(v1, true, false).is_discarded());
2656 …json::from_bjdata(v2), "[json.exception.parse_error.113] parse error at byte 6: syntax error while…
2657 CHECK(json::from_bjdata(v2, true, false).is_discarded());
2659 …json::from_bjdata(v3), "[json.exception.parse_error.113] parse error at byte 7: syntax error while…
2660 CHECK(json::from_bjdata(v3, true, false).is_discarded());
2662 …json::from_bjdata(v4), "[json.exception.parse_error.113] parse error at byte 6: syntax error while…
2663 CHECK(json::from_bjdata(v4, true, false).is_discarded());
2665 …json::from_bjdata(v5), "[json.exception.parse_error.113] parse error at byte 7: syntax error while…
2666 CHECK(json::from_bjdata(v5, true, false).is_discarded());
2668 …json::from_bjdata(v6), "[json.exception.parse_error.113] parse error at byte 5: syntax error while…
2669 CHECK(json::from_bjdata(v6, true, false).is_discarded());
2671 …json::from_bjdata(vI), "[json.exception.parse_error.113] parse error at byte 5: syntax error while…
2672 CHECK(json::from_bjdata(vI, true, false).is_discarded());
2674 …json::from_bjdata(vl), "[json.exception.parse_error.113] parse error at byte 7: syntax error while…
2675 CHECK(json::from_bjdata(vl, true, false).is_discarded());
2677 …json::from_bjdata(vL), "[json.exception.parse_error.113] parse error at byte 11: syntax error whil…
2678 CHECK(json::from_bjdata(vL, true, false).is_discarded());
2681 …(_ = json::from_bjdata(vM), "[json.exception.out_of_range.408] syntax error while parsing BJData s…
2683 …_WITH_AS(_ = json::from_bjdata(vM), "[json.exception.out_of_range.408] syntax error while parsing …
2685 CHECK(json::from_bjdata(vM, true, false).is_discarded());
2688 …_ = json::from_bjdata(vMX), "[json.exception.out_of_range.408] syntax error while parsing BJData s…
2690 …WITH_AS(_ = json::from_bjdata(vMX), "[json.exception.out_of_range.408] syntax error while parsing …
2692 CHECK(json::from_bjdata(vMX, true, false).is_discarded());
2701 json _;
2702 …_WITH_AS(_ = json::from_bjdata(vL), "[json.exception.out_of_range.408] syntax error while parsing …
2703 CHECK(json::from_bjdata(vL, true, false).is_discarded());
2704 …_WITH_AS(_ = json::from_bjdata(vM), "[json.exception.out_of_range.408] syntax error while parsing …
2705 CHECK(json::from_bjdata(vM, true, false).is_discarded());
2711 json _;
2717 …json::from_bjdata(v_N), "[json.exception.parse_error.112] parse error at byte 3: syntax error whil…
2718 CHECK(json::from_bjdata(v_N, true, false).is_discarded());
2720 …json::from_bjdata(v_T), "[json.exception.parse_error.112] parse error at byte 3: syntax error whil…
2721 CHECK(json::from_bjdata(v_T, true, false).is_discarded());
2723 …json::from_bjdata(v_F), "[json.exception.parse_error.112] parse error at byte 3: syntax error whil…
2724 CHECK(json::from_bjdata(v_F, true, false).is_discarded());
2726 …json::from_bjdata(v_Z), "[json.exception.parse_error.112] parse error at byte 3: syntax error whil…
2727 CHECK(json::from_bjdata(v_Z, true, false).is_discarded());
2732 json _;
2738 …json::from_bjdata(v_N), "[json.exception.parse_error.112] parse error at byte 3: syntax error whil…
2739 CHECK(json::from_bjdata(v_N, true, false).is_discarded());
2741 …json::from_bjdata(v_T), "[json.exception.parse_error.112] parse error at byte 3: syntax error whil…
2742 CHECK(json::from_bjdata(v_T, true, false).is_discarded());
2744 …json::from_bjdata(v_F), "[json.exception.parse_error.112] parse error at byte 3: syntax error whil…
2745 CHECK(json::from_bjdata(v_F, true, false).is_discarded());
2747 …json::from_bjdata(v_Z), "[json.exception.parse_error.112] parse error at byte 3: syntax error whil…
2748 CHECK(json::from_bjdata(v_Z, true, false).is_discarded());
2755 json _;
2756 … json::from_bjdata(vS), "[json.exception.parse_error.110] parse error at byte 2: syntax error whil…
2757 CHECK(json::from_bjdata(vS, true, false).is_discarded());
2760 … json::from_bjdata(v), "[json.exception.parse_error.110] parse error at byte 5: syntax error while…
2761 CHECK(json::from_bjdata(v, true, false).is_discarded());
2764 … json::from_bjdata(vC), "[json.exception.parse_error.110] parse error at byte 2: syntax error whil…
2765 CHECK(json::from_bjdata(vC, true, false).is_discarded());
2771 json _;
2772 …json::from_bjdata(vU), "[json.exception.parse_error.110] parse error at byte 4: syntax error while…
2773 CHECK(json::from_bjdata(vU, true, false).is_discarded());
2776 …json::from_bjdata(vi), "[json.exception.parse_error.110] parse error at byte 4: syntax error while…
2777 CHECK(json::from_bjdata(vi, true, false).is_discarded());
2780 …json::from_bjdata(vI), "[json.exception.parse_error.110] parse error at byte 4: syntax error while…
2781 CHECK(json::from_bjdata(vI, true, false).is_discarded());
2784 …json::from_bjdata(vu), "[json.exception.parse_error.110] parse error at byte 4: syntax error while…
2785 CHECK(json::from_bjdata(vu, true, false).is_discarded());
2788 …json::from_bjdata(vl), "[json.exception.parse_error.110] parse error at byte 4: syntax error while…
2789 CHECK(json::from_bjdata(vl, true, false).is_discarded());
2792 …json::from_bjdata(vm), "[json.exception.parse_error.110] parse error at byte 4: syntax error while…
2793 CHECK(json::from_bjdata(vm, true, false).is_discarded());
2796 …json::from_bjdata(vL), "[json.exception.parse_error.110] parse error at byte 4: syntax error while…
2797 CHECK(json::from_bjdata(vL, true, false).is_discarded());
2800 …json::from_bjdata(vM), "[json.exception.parse_error.110] parse error at byte 4: syntax error while…
2801 CHECK(json::from_bjdata(vM, true, false).is_discarded());
2804 …CHECK_THROWS_WITH(_ = json::from_bjdata(v0), "[json.exception.parse_error.113] parse error at byte…
2805 CHECK(json::from_bjdata(v0, true, false).is_discarded());
2810 json _;
2812 …json::from_ubjson(vu), "[json.exception.parse_error.113] parse error at byte 3: syntax error while…
2813 CHECK(json::from_ubjson(vu, true, false).is_discarded());
2816 …json::from_ubjson(vm), "[json.exception.parse_error.113] parse error at byte 3: syntax error while…
2817 CHECK(json::from_ubjson(vm, true, false).is_discarded());
2820 …json::from_ubjson(vM), "[json.exception.parse_error.113] parse error at byte 3: syntax error while…
2821 CHECK(json::from_ubjson(vM, true, false).is_discarded());
2824 …json::from_ubjson(v0), "[json.exception.parse_error.113] parse error at byte 3: syntax error while…
2825 CHECK(json::from_ubjson(v0, true, false).is_discarded());
2831 json _;
2832 … json::from_bjdata(v0), "[json.exception.parse_error.110] parse error at byte 3: syntax error whil…
2833 CHECK(json::from_bjdata(v0, true, false).is_discarded());
2836 … json::from_bjdata(vi), "[json.exception.parse_error.110] parse error at byte 4: syntax error whil…
2837 CHECK(json::from_bjdata(vi, true, false).is_discarded());
2840 … json::from_bjdata(vU), "[json.exception.parse_error.110] parse error at byte 4: syntax error whil…
2841 CHECK(json::from_bjdata(vU, true, false).is_discarded());
2844 …json::from_bjdata(v1), "[json.exception.parse_error.112] parse error at byte 3: syntax error while…
2845 CHECK(json::from_bjdata(v1, true, false).is_discarded());
2851 json _;
2852 …json::from_bjdata(vST), "[json.exception.parse_error.110] parse error at byte 8: syntax error whil…
2853 CHECK(json::from_bjdata(vST, true, false).is_discarded());
2856 … json::from_bjdata(vS), "[json.exception.parse_error.110] parse error at byte 7: syntax error whil…
2857 CHECK(json::from_bjdata(vS, true, false).is_discarded());
2860 … json::from_bjdata(v), "[json.exception.parse_error.110] parse error at byte 6: syntax error while…
2861 CHECK(json::from_bjdata(v, true, false).is_discarded());
2867 json _;
2868 …json::from_bjdata(vST), "[json.exception.parse_error.113] parse error at byte 9: syntax error whil…
2869 CHECK(json::from_bjdata(vST, true, false).is_discarded());
2872 …json::from_bjdata(v), "[json.exception.parse_error.110] parse error at byte 13: syntax error while…
2873 CHECK(json::from_bjdata(v, true, false).is_discarded());
2876 …json::from_bjdata(vS0), "[json.exception.parse_error.110] parse error at byte 12: syntax error whi…
2877 CHECK(json::from_bjdata(vS0, true, false).is_discarded());
2880 …json::from_bjdata(vS), "[json.exception.parse_error.113] parse error at byte 9: syntax error while…
2881 CHECK(json::from_bjdata(vS, true, false).is_discarded());
2884 …json::from_bjdata(vT), "[json.exception.parse_error.110] parse error at byte 9: syntax error while…
2885 CHECK(json::from_bjdata(vT, true, false).is_discarded());
2888 …json::from_bjdata(vT0), "[json.exception.parse_error.110] parse error at byte 7: syntax error whil…
2889 CHECK(json::from_bjdata(vT0, true, false).is_discarded());
2892 …json::from_bjdata(vu), "[json.exception.parse_error.110] parse error at byte 12: syntax error whil…
2893 CHECK(json::from_bjdata(vu, true, false).is_discarded());
2896 …json::from_bjdata(vm), "[json.exception.parse_error.110] parse error at byte 14: syntax error whil…
2897 CHECK(json::from_bjdata(vm, true, false).is_discarded());
2900 …json::from_bjdata(vM), "[json.exception.parse_error.110] parse error at byte 18: syntax error whil…
2901 CHECK(json::from_bjdata(vM, true, false).is_discarded());
2904 …json::from_bjdata(vU), "[json.exception.parse_error.110] parse error at byte 18: syntax error whil…
2905 CHECK(json::from_bjdata(vU, true, false).is_discarded());
2908 CHECK(json::from_bjdata(vT1, true, false).is_discarded());
2911 CHECK(json::from_bjdata(vh, true, false).is_discarded());
2914 …json::from_bjdata(vR), "[json.exception.parse_error.113] parse error at byte 8: syntax error while…
2915 CHECK(json::from_bjdata(vR, true, false).is_discarded());
2918 …json::from_bjdata(vRo), "[json.exception.parse_error.113] parse error at byte 8: syntax error whil…
2919 CHECK(json::from_bjdata(vRo, true, false).is_discarded());
2922 …json::from_bjdata(vR1), "[json.exception.parse_error.113] parse error at byte 6: syntax error whil…
2923 CHECK(json::from_bjdata(vR1, true, false).is_discarded());
2926 …json::from_bjdata(vR2), "[json.exception.parse_error.113] parse error at byte 11: syntax error whi…
2927 CHECK(json::from_bjdata(vR2, true, false).is_discarded());
2930 …json::from_bjdata(vR3), "[json.exception.parse_error.112] parse error at byte 8: syntax error whil…
2931 CHECK(json::from_bjdata(vR3, true, false).is_discarded());
2934 …json::from_bjdata(vR4), "[json.exception.parse_error.110] parse error at byte 14: syntax error whi…
2935 CHECK(json::from_bjdata(vR4, true, false).is_discarded());
2938 …json::from_bjdata(vR5), "[json.exception.parse_error.113] parse error at byte 6: syntax error whil…
2939 CHECK(json::from_bjdata(vR5, true, false).is_discarded());
2942 …json::from_bjdata(vR6), "[json.exception.parse_error.112] parse error at byte 14: syntax error whi…
2943 CHECK(json::from_bjdata(vR6, true, false).is_discarded());
2946 …json::from_bjdata(vH), "[json.exception.parse_error.113] parse error at byte 3: syntax error while…
2947 CHECK(json::from_bjdata(vH, true, false).is_discarded());
2953 json _;
2954 …json::from_bjdata(vST), "[json.exception.parse_error.110] parse error at byte 11: syntax error whi…
2955 CHECK(json::from_bjdata(vST, true, false).is_discarded());
2958 …CHECK_THROWS_WITH(_ = json::from_bjdata(vT), "[json.exception.parse_error.112] parse error at byte…
2959 CHECK(json::from_bjdata(vT, true, false).is_discarded());
2962 …json::from_bjdata(vS), "[json.exception.parse_error.110] parse error at byte 10: syntax error whil…
2963 CHECK(json::from_bjdata(vS, true, false).is_discarded());
2966 … json::from_bjdata(v), "[json.exception.parse_error.110] parse error at byte 7: syntax error while…
2967 CHECK(json::from_bjdata(v, true, false).is_discarded());
2970 …json::from_bjdata(v2), "[json.exception.parse_error.110] parse error at byte 8: syntax error while…
2971 CHECK(json::from_bjdata(v2, true, false).is_discarded());
2974 … json::from_bjdata(v3), "[json.exception.parse_error.110] parse error at byte 5: syntax error whil…
2975 CHECK(json::from_bjdata(v3, true, false).is_discarded());
2978 …json::from_bjdata(vST1), "[json.exception.parse_error.110] parse error at byte 10: syntax error wh…
2979 CHECK(json::from_bjdata(vST1, true, false).is_discarded());
2982 …json::from_bjdata(vST2), "[json.exception.parse_error.110] parse error at byte 8: syntax error whi…
2983 CHECK(json::from_bjdata(vST2, true, false).is_discarded());
2986 …json::from_bjdata(vO), "[json.exception.parse_error.112] parse error at byte 8: syntax error while…
2987 CHECK(json::from_bjdata(vO, true, false).is_discarded());
2990 …json::from_bjdata(vO2), "[json.exception.parse_error.112] parse error at byte 10: syntax error whi…
2991 CHECK(json::from_bjdata(vO2, true, false).is_discarded());
3001 json const j = {1, -1};
3003 CHECK(json::to_bjdata(j, true, true) == expected);
3008 json const j = {200, 201};
3010 CHECK(json::to_bjdata(j, true, true) == expected);
3015 json const j = {30000, -30000};
3017 CHECK(json::to_bjdata(j, true, true) == expected);
3022 json const j = {50000, 50001};
3024 CHECK(json::to_bjdata(j, true, true) == expected);
3029 json const j = {70000, -70000};
3031 CHECK(json::to_bjdata(j, true, true) == expected);
3036 json const j = {3147483647, 3147483648};
3038 CHECK(json::to_bjdata(j, true, true) == expected);
3043 json const j = {5000000000, -5000000000};
3045 CHECK(json::to_bjdata(j, true, true) == expected);
3053 json const j = {1u, 2u};
3056 CHECK(json::to_bjdata(j, true, true) == expected);
3057 CHECK(json::to_bjdata(j, true) == expected_size);
3062 json const j = {200u, 201u};
3065 CHECK(json::to_bjdata(j, true, true) == expected);
3066 CHECK(json::to_bjdata(j, true) == expected_size);
3071 json const j = {30000u, 30001u};
3074 CHECK(json::to_bjdata(j, true, true) == expected);
3075 CHECK(json::to_bjdata(j, true) == expected_size);
3080 json const j = {50000u, 50001u};
3083 CHECK(json::to_bjdata(j, true, true) == expected);
3084 CHECK(json::to_bjdata(j, true) == expected_size);
3089 json const j = {70000u, 70001u};
3092 CHECK(json::to_bjdata(j, true, true) == expected);
3093 CHECK(json::to_bjdata(j, true) == expected_size);
3098 json const j = {3147483647u, 3147483648u};
3101 CHECK(json::to_bjdata(j, true, true) == expected);
3102 CHECK(json::to_bjdata(j, true) == expected_size);
3107 json const j = {5000000000u, 5000000001u};
3110 CHECK(json::to_bjdata(j, true, true) == expected);
3111 CHECK(json::to_bjdata(j, true) == expected_size);
3116 json const j = {10223372036854775807ull, 10223372036854775808ull};
3119 CHECK(json::to_bjdata(j, true, true) == expected);
3120 CHECK(json::to_bjdata(j, true) == expected_size);
3126 TEST_CASE("Universal Binary JSON Specification Examples 1")
3130 json const j = {{"passcode", nullptr}};
3132 CHECK(json::to_bjdata(j) == v);
3133 CHECK(json::from_bjdata(v) == j);
3138 json const j = {"foo", "bar", "baz"};
3147 CHECK(json::to_bjdata(j) == v);
3148 CHECK(json::from_bjdata(v) == j);
3149 CHECK(json::from_bjdata(v2) == j);
3154 json const j = {{"authorized", true}, {"verified", false}};
3158 CHECK(json::to_bjdata(j) == v);
3159 CHECK(json::from_bjdata(v) == j);
3164 json j =
3188 CHECK(json::to_bjdata(j) == v);
3189 CHECK(json::from_bjdata(v) == j);
3194 json const j = {{"rolecode", "a"}, {"delim", ";"}};
3196 //CHECK(json::to_bjdata(j) == v);
3197 CHECK(json::from_bjdata(v) == j);
3204 json const j = "hello";
3206 CHECK(json::to_bjdata(j) == v);
3207 CHECK(json::from_bjdata(v) == j);
3212 json const j = "привет";
3214 CHECK(json::to_bjdata(j) == v);
3215 CHECK(json::from_bjdata(v) == j);
3220 json const j = "مرحبا";
3222 CHECK(json::to_bjdata(j) == v);
3223 CHECK(json::from_bjdata(v) == j);
3232 json const j = {nullptr, true, false, 4782345193, 153.132, "ham"};
3234 CHECK(json::to_bjdata(j) == v);
3235 CHECK(json::from_bjdata(v) == j);
3241 json const j = {nullptr, true, false, 4782345193, 153.132, "ham"};
3243 CHECK(json::to_bjdata(j, true) == v);
3244 CHECK(json::from_bjdata(v) == j);
3250 json const j = {nullptr, true, false, 4782345193, 153.132, "ham"};
3252 CHECK(json::to_bjdata(j, true, true) == v);
3253 CHECK(json::from_bjdata(v) == j);
3261 json j =
3279 CHECK(json::to_bjdata(j) == v);
3280 CHECK(json::from_bjdata(v) == j);
3285 json j =
3302 CHECK(json::to_bjdata(j, true) == v);
3303 CHECK(json::from_bjdata(v) == j);
3308 json j =
3325 CHECK(json::to_bjdata(j, true, true) == v);
3326 CHECK(json::from_bjdata(v) == j);
3337 json const j = {29.97, 31.13, 67.0, 2.113, 23.888};
3346 CHECK(json::to_bjdata(j) == v);
3347 CHECK(json::from_bjdata(v) == j);
3353 json const j = {29.97, 31.13, 67.0, 2.113, 23.888};
3361 CHECK(json::to_bjdata(j, true) == v);
3362 CHECK(json::from_bjdata(v) == j);
3368 json const j = {29.97, 31.13, 67.0, 2.113, 23.888};
3376 CHECK(json::to_bjdata(j, true, true) == v);
3377 CHECK(json::from_bjdata(v) == j);
3386 json const j = { {"lat", 29.976}, {"long", 31.131}, {"alt", 67.0} };
3393 CHECK(json::to_bjdata(j) == v);
3394 CHECK(json::from_bjdata(v) == j);
3400 json const j = { {"lat", 29.976}, {"long", 31.131}, {"alt", 67.0} };
3406 CHECK(json::to_bjdata(j, true) == v);
3407 CHECK(json::from_bjdata(v) == j);
3413 json const j = { {"lat", 29.976}, {"long", 31.131}, {"alt", 67.0} };
3419 CHECK(json::to_bjdata(j, true, true) == v);
3420 CHECK(json::from_bjdata(v) == j);
3428 json _;
3430 …json::from_bjdata(v), "[json.exception.parse_error.112] parse error at byte 3: syntax error while …
3431 CHECK(json::from_bjdata(v, true, false).is_discarded());
3436 json _;
3438 …json::from_bjdata(v), "[json.exception.parse_error.112] parse error at byte 3: syntax error while …
3439 CHECK(json::from_bjdata(v, true, false).is_discarded());
3461 auto res = json::from_bjdata(std::vector<uint8_t>(1, byte)); in CAPTURE()
3463 catch (const json::parse_error& e)
3487 TEST_DATA_DIRECTORY "/json_nlohmann_tests/all_unicode.json", in skip()
3488 TEST_DATA_DIRECTORY "/json.org/1.json", in skip()
3489 TEST_DATA_DIRECTORY "/json.org/2.json", in skip()
3490 TEST_DATA_DIRECTORY "/json.org/3.json", in skip()
3491 TEST_DATA_DIRECTORY "/json.org/4.json", in skip()
3492 TEST_DATA_DIRECTORY "/json.org/5.json", in skip()
3493 TEST_DATA_DIRECTORY "/json_roundtrip/roundtrip01.json", in skip()
3494 TEST_DATA_DIRECTORY "/json_roundtrip/roundtrip02.json", in skip()
3495 TEST_DATA_DIRECTORY "/json_roundtrip/roundtrip03.json", in skip()
3496 TEST_DATA_DIRECTORY "/json_roundtrip/roundtrip04.json", in skip()
3497 TEST_DATA_DIRECTORY "/json_roundtrip/roundtrip05.json", in skip()
3498 TEST_DATA_DIRECTORY "/json_roundtrip/roundtrip06.json", in skip()
3499 TEST_DATA_DIRECTORY "/json_roundtrip/roundtrip07.json", in skip()
3500 TEST_DATA_DIRECTORY "/json_roundtrip/roundtrip08.json", in skip()
3501 TEST_DATA_DIRECTORY "/json_roundtrip/roundtrip09.json", in skip()
3502 TEST_DATA_DIRECTORY "/json_roundtrip/roundtrip10.json", in skip()
3503 TEST_DATA_DIRECTORY "/json_roundtrip/roundtrip11.json", in skip()
3504 TEST_DATA_DIRECTORY "/json_roundtrip/roundtrip12.json", in skip()
3505 TEST_DATA_DIRECTORY "/json_roundtrip/roundtrip13.json", in skip()
3506 TEST_DATA_DIRECTORY "/json_roundtrip/roundtrip14.json", in skip()
3507 TEST_DATA_DIRECTORY "/json_roundtrip/roundtrip15.json", in skip()
3508 TEST_DATA_DIRECTORY "/json_roundtrip/roundtrip16.json", in skip()
3509 TEST_DATA_DIRECTORY "/json_roundtrip/roundtrip17.json", in skip()
3510 TEST_DATA_DIRECTORY "/json_roundtrip/roundtrip18.json", in skip()
3511 TEST_DATA_DIRECTORY "/json_roundtrip/roundtrip19.json", in skip()
3512 TEST_DATA_DIRECTORY "/json_roundtrip/roundtrip20.json", in skip()
3513 TEST_DATA_DIRECTORY "/json_roundtrip/roundtrip21.json", in skip()
3514 TEST_DATA_DIRECTORY "/json_roundtrip/roundtrip22.json", in skip()
3515 TEST_DATA_DIRECTORY "/json_roundtrip/roundtrip23.json", in skip()
3516 TEST_DATA_DIRECTORY "/json_roundtrip/roundtrip24.json", in skip()
3517 TEST_DATA_DIRECTORY "/json_roundtrip/roundtrip25.json", in skip()
3518 TEST_DATA_DIRECTORY "/json_roundtrip/roundtrip26.json", in skip()
3519 TEST_DATA_DIRECTORY "/json_roundtrip/roundtrip27.json", in skip()
3520 TEST_DATA_DIRECTORY "/json_roundtrip/roundtrip28.json", in skip()
3521 TEST_DATA_DIRECTORY "/json_roundtrip/roundtrip29.json", in skip()
3522 TEST_DATA_DIRECTORY "/json_roundtrip/roundtrip30.json", in skip()
3523 TEST_DATA_DIRECTORY "/json_roundtrip/roundtrip31.json", in skip()
3524 TEST_DATA_DIRECTORY "/json_roundtrip/roundtrip32.json", in skip()
3525 TEST_DATA_DIRECTORY "/json_testsuite/sample.json", in skip()
3526 TEST_DATA_DIRECTORY "/json_tests/pass1.json", in skip()
3527 TEST_DATA_DIRECTORY "/json_tests/pass2.json", in skip()
3528 TEST_DATA_DIRECTORY "/json_tests/pass3.json" in skip()
3535 // parse JSON file in skip()
3537 json j1 = json::parse(f_json); in skip()
3541 json j2; in skip()
3542 CHECK_NOTHROW(j2 = json::from_bjdata(packed)); in skip()
3544 // compare parsed JSON values in skip()
3550 // parse JSON file in skip()
3552 json j1 = json::parse(f_json); in skip()
3556 json j2; in skip()
3557 CHECK_NOTHROW(j2 = json::from_bjdata(f_bjdata)); in skip()
3559 // compare parsed JSON values in skip()
3565 // parse JSON file in skip()
3567 json const j1 = json::parse(f_json); in skip()
3575 json::to_bjdata(j1, vec); in skip()