68 using number_integer_t =
typename BasicJsonType::number_integer_t;
69 using number_unsigned_t =
typename BasicJsonType::number_unsigned_t;
70 using number_float_t =
typename BasicJsonType::number_float_t;
71 using string_t =
typename BasicJsonType::string_t;
72 using binary_t =
typename BasicJsonType::binary_t;
73 using json_sax_t = SAX;
74 using char_type =
typename InputAdapterType::char_type;
115 result = parse_bson_internal();
119 result = parse_cbor_internal(
true, tag_handler);
123 result = parse_msgpack_internal();
128 result = parse_ubjson_internal();
150 return sax->parse_error(chars_read, get_token_string(),
parse_error::create(110, chars_read,
151 exception_message(input_format,
concat(
"expected end of input; last byte: 0x", get_token_string()),
"value"),
nullptr));
167 bool parse_bson_internal()
169 std::int32_t document_size{};
182 return sax->end_object();
192 bool get_bson_cstr(string_t& result)
194 auto out = std::back_inserter(result);
206 *out++ =
static_cast<typename string_t::value_type
>(current);
221 template<
typename NumberType>
222 bool get_bson_string(
const NumberType len, string_t& result)
226 auto last_token = get_token_string();
228 exception_message(
input_format_t::bson,
concat(
"string length must be at least 1, is ", std::to_string(len)),
"string"),
nullptr));
231 return get_string(
input_format_t::bson, len -
static_cast<NumberType
>(1), result) && get() != char_traits<char_type>::eof();
243 template<
typename NumberType>
244 bool get_bson_binary(
const NumberType len, binary_t& result)
248 auto last_token = get_token_string();
250 exception_message(
input_format_t::bson,
concat(
"byte array length cannot be negative, is ", std::to_string(len)),
"binary"),
nullptr));
254 std::uint8_t subtype{};
256 result.set_subtype(subtype);
271 bool parse_bson_element_internal(
const char_int_type element_type,
272 const std::size_t element_type_parse_position)
274 switch (element_type)
279 return get_number<double, true>(
input_format_t::bson, number) && sax->number_float(
static_cast<number_float_t
>(number),
"");
291 return parse_bson_internal();
296 return parse_bson_array();
308 return sax->boolean(get() != 0);
318 std::int32_t
value{};
324 std::int64_t
value{};
330 std::array<char, 3> cr{{}};
331 static_cast<void>((std::snprintf)(cr.data(), cr.size(),
"%.2hhX",
static_cast<unsigned char>(element_type)));
332 const std::string cr_str{cr.data()};
333 return sax->parse_error(element_type_parse_position, cr_str,
351 bool parse_bson_element_list(
const bool is_array)
355 while (
auto element_type = get())
362 const std::size_t element_type_parse_position = chars_read;
368 if (!is_array && !sax->key(
key))
373 if (
JSON_HEDLEY_UNLIKELY(!parse_bson_element_internal(element_type, element_type_parse_position)))
389 bool parse_bson_array()
391 std::int32_t document_size{};
404 return sax->end_array();
419 bool parse_cbor_internal(
const bool get_char,
422 switch (get_char ? get() : current)
425 case char_traits<char_type>::eof():
453 return sax->number_unsigned(
static_cast<number_unsigned_t
>(current));
457 std::uint8_t number{};
463 std::uint16_t number{};
469 std::uint32_t number{};
475 std::uint64_t number{};
504 return sax->number_integer(
static_cast<std::int8_t
>(0x20 - 1 - current));
508 std::uint8_t number{};
509 return get_number(
input_format_t::cbor, number) && sax->number_integer(
static_cast<number_integer_t
>(-1) - number);
514 std::uint16_t number{};
515 return get_number(
input_format_t::cbor, number) && sax->number_integer(
static_cast<number_integer_t
>(-1) - number);
520 std::uint32_t number{};
521 return get_number(
input_format_t::cbor, number) && sax->number_integer(
static_cast<number_integer_t
>(-1) - number);
526 std::uint64_t number{};
527 return get_number(
input_format_t::cbor, number) && sax->number_integer(
static_cast<number_integer_t
>(-1)
528 -
static_cast<number_integer_t
>(number));
563 return get_cbor_binary(b) && sax->binary(b);
598 return get_cbor_string(s) && sax->string(s);
626 return get_cbor_array(
632 return get_number(
input_format_t::cbor, len) && get_cbor_array(
static_cast<std::size_t
>(len), tag_handler);
638 return get_number(
input_format_t::cbor, len) && get_cbor_array(
static_cast<std::size_t
>(len), tag_handler);
654 return get_cbor_array(
static_cast<std::size_t
>(-1), tag_handler);
686 return get_number(
input_format_t::cbor, len) && get_cbor_object(
static_cast<std::size_t
>(len), tag_handler);
692 return get_number(
input_format_t::cbor, len) && get_cbor_object(
static_cast<std::size_t
>(len), tag_handler);
708 return get_cbor_object(
static_cast<std::size_t
>(-1), tag_handler);
734 auto last_token = get_token_string();
746 std::uint8_t subtype_to_ignore{};
752 std::uint16_t subtype_to_ignore{};
758 std::uint32_t subtype_to_ignore{};
764 std::uint64_t subtype_to_ignore{};
771 return parse_cbor_internal(
true, tag_handler);
782 std::uint8_t subtype{};
789 std::uint16_t subtype{};
796 std::uint32_t subtype{};
803 std::uint64_t subtype{};
809 return parse_cbor_internal(
true, tag_handler);
812 return get_cbor_binary(b) && sax->binary(b);
822 return sax->boolean(
false);
825 return sax->boolean(
true);
832 const auto byte1_raw = get();
837 const auto byte2_raw = get();
843 const auto byte1 =
static_cast<unsigned char>(byte1_raw);
844 const auto byte2 =
static_cast<unsigned char>(byte2_raw);
854 const auto half =
static_cast<unsigned int>((byte1 << 8u) + byte2);
855 const double val = [&half]
857 const int exp = (half >> 10u) & 0x1Fu;
858 const unsigned int mant = half & 0x3FFu;
864 return std::ldexp(mant, -24);
867 ? std::numeric_limits<double>::infinity()
868 :
std::numeric_limits<double>::quiet_NaN();
870 return std::ldexp(mant + 1024,
exp - 25);
873 return sax->number_float((half & 0x8000u) != 0
874 ?
static_cast<number_float_t
>(-val)
875 :
static_cast<number_float_t
>(val),
"");
881 return get_number(
input_format_t::cbor, number) && sax->number_float(
static_cast<number_float_t
>(number),
"");
887 return get_number(
input_format_t::cbor, number) && sax->number_float(
static_cast<number_float_t
>(number),
"");
892 auto last_token = get_token_string();
910 bool get_cbor_string(string_t& result)
974 while (get() != 0xFF)
977 if (!get_cbor_string(chunk))
981 result.append(chunk);
988 auto last_token = get_token_string();
990 exception_message(
input_format_t::cbor,
concat(
"expected length specification (0x60-0x7B) or indefinite string type (0x7F); last byte: 0x", last_token),
"string"),
nullptr));
1006 bool get_cbor_binary(binary_t& result)
1053 std::uint16_t len{};
1060 std::uint32_t len{};
1067 std::uint64_t len{};
1074 while (get() != 0xFF)
1077 if (!get_cbor_binary(chunk))
1081 result.insert(result.end(), chunk.begin(), chunk.end());
1088 auto last_token = get_token_string();
1090 exception_message(
input_format_t::cbor,
concat(
"expected length specification (0x40-0x5B) or indefinite binary array type (0x5F); last byte: 0x", last_token),
"binary"),
nullptr));
1101 bool get_cbor_array(
const std::size_t len,
1109 if (len !=
static_cast<std::size_t
>(-1))
1111 for (std::size_t i = 0; i < len; ++i)
1121 while (get() != 0xFF)
1130 return sax->end_array();
1139 bool get_cbor_object(
const std::size_t len,
1150 if (len !=
static_cast<std::size_t
>(-1))
1152 for (std::size_t i = 0; i < len; ++i)
1169 while (get() != 0xFF)
1185 return sax->end_object();
1195 bool parse_msgpack_internal()
1200 case char_traits<char_type>::eof():
1332 return sax->number_unsigned(
static_cast<number_unsigned_t
>(current));
1410 return get_msgpack_string(s) && sax->string(s);
1417 return sax->boolean(
false);
1420 return sax->boolean(
true);
1435 return get_msgpack_binary(b) && sax->binary(b);
1441 return get_number(
input_format_t::msgpack, number) && sax->number_float(
static_cast<number_float_t
>(number),
"");
1447 return get_number(
input_format_t::msgpack, number) && sax->number_float(
static_cast<number_float_t
>(number),
"");
1452 std::uint8_t number{};
1458 std::uint16_t number{};
1464 std::uint32_t number{};
1470 std::uint64_t number{};
1476 std::int8_t number{};
1482 std::int16_t number{};
1488 std::int32_t number{};
1494 std::int64_t number{};
1500 std::uint16_t len{};
1506 std::uint32_t len{};
1512 std::uint16_t len{};
1518 std::uint32_t len{};
1555 return sax->number_integer(
static_cast<std::int8_t
>(current));
1559 auto last_token = get_token_string();
1576 bool get_msgpack_string(string_t& result)
1630 std::uint16_t len{};
1636 std::uint32_t len{};
1642 auto last_token = get_token_string();
1644 exception_message(
input_format_t::msgpack,
concat(
"expected length specification (0xA0-0xBF, 0xD9-0xDB); last byte: 0x", last_token),
"string"),
nullptr));
1659 bool get_msgpack_binary(binary_t& result)
1662 auto assign_and_return_true = [&result](std::int8_t subtype)
1664 result.set_subtype(
static_cast<std::uint8_t
>(subtype));
1679 std::uint16_t len{};
1686 std::uint32_t len{};
1694 std::int8_t subtype{};
1698 assign_and_return_true(subtype);
1703 std::uint16_t len{};
1704 std::int8_t subtype{};
1708 assign_and_return_true(subtype);
1713 std::uint32_t len{};
1714 std::int8_t subtype{};
1718 assign_and_return_true(subtype);
1723 std::int8_t subtype{};
1726 assign_and_return_true(subtype);
1731 std::int8_t subtype{};
1734 assign_and_return_true(subtype);
1739 std::int8_t subtype{};
1742 assign_and_return_true(subtype);
1747 std::int8_t subtype{};
1750 assign_and_return_true(subtype);
1755 std::int8_t subtype{};
1758 assign_and_return_true(subtype);
1770 bool get_msgpack_array(
const std::size_t len)
1777 for (std::size_t i = 0; i < len; ++i)
1785 return sax->end_array();
1792 bool get_msgpack_object(
const std::size_t len)
1800 for (std::size_t i = 0; i < len; ++i)
1815 return sax->end_object();
1829 bool parse_ubjson_internal(
const bool get_char =
true)
1831 return get_ubjson_value(get_char ? get_ignore_noop() : current);
1848 bool get_ubjson_string(string_t& result,
const bool get_char =
true)
1865 return get_number(input_format, len) && get_string(input_format, len, result);
1871 return get_number(input_format, len) && get_string(input_format, len, result);
1877 return get_number(input_format, len) && get_string(input_format, len, result);
1883 return get_number(input_format, len) && get_string(input_format, len, result);
1889 return get_number(input_format, len) && get_string(input_format, len, result);
1898 std::uint16_t len{};
1899 return get_number(input_format, len) && get_string(input_format, len, result);
1908 std::uint32_t len{};
1909 return get_number(input_format, len) && get_string(input_format, len, result);
1918 std::uint64_t len{};
1919 return get_number(input_format, len) && get_string(input_format, len, result);
1925 auto last_token = get_token_string();
1926 std::string message;
1930 message =
"expected length type specification (U, i, I, l, L); last byte: 0x" + last_token;
1934 message =
"expected length type specification (U, i, u, I, m, l, M, L); last byte: 0x" + last_token;
1936 return sax->parse_error(chars_read, last_token,
parse_error::create(113, chars_read, exception_message(input_format, message,
"string"),
nullptr));
1943 bool get_ubjson_ndarray_size(std::vector<size_t>& dim)
1945 std::pair<std::size_t, char_int_type> size_and_type;
1947 bool no_ndarray =
true;
1954 if (size_and_type.first != npos)
1956 if (size_and_type.second != 0)
1958 if (size_and_type.second !=
'N')
1960 for (std::size_t i = 0; i < size_and_type.first; ++i)
1966 dim.push_back(dimlen);
1972 for (std::size_t i = 0; i < size_and_type.first; ++i)
1978 dim.push_back(dimlen);
1984 while (current !=
']')
1990 dim.push_back(dimlen);
2008 bool get_ubjson_size_value(std::size_t& result,
bool& is_ndarray, char_int_type prefix = 0)
2012 prefix = get_ignore_noop();
2019 std::uint8_t number{};
2024 result =
static_cast<std::size_t
>(number);
2030 std::int8_t number{};
2037 return sax->parse_error(chars_read, get_token_string(),
parse_error::create(113, chars_read,
2038 exception_message(input_format,
"count in an optimized container must be positive",
"size"),
nullptr));
2040 result =
static_cast<std::size_t
>(number);
2046 std::int16_t number{};
2053 return sax->parse_error(chars_read, get_token_string(),
parse_error::create(113, chars_read,
2054 exception_message(input_format,
"count in an optimized container must be positive",
"size"),
nullptr));
2056 result =
static_cast<std::size_t
>(number);
2062 std::int32_t number{};
2069 return sax->parse_error(chars_read, get_token_string(),
parse_error::create(113, chars_read,
2070 exception_message(input_format,
"count in an optimized container must be positive",
"size"),
nullptr));
2072 result =
static_cast<std::size_t
>(number);
2078 std::int64_t number{};
2085 return sax->parse_error(chars_read, get_token_string(),
parse_error::create(113, chars_read,
2086 exception_message(input_format,
"count in an optimized container must be positive",
"size"),
nullptr));
2091 exception_message(input_format,
"integer value overflow",
"size"),
nullptr));
2093 result =
static_cast<std::size_t
>(number);
2103 std::uint16_t number{};
2108 result =
static_cast<std::size_t
>(number);
2118 std::uint32_t number{};
2133 std::uint64_t number{};
2141 exception_message(input_format,
"integer value overflow",
"size"),
nullptr));
2155 return sax->parse_error(chars_read, get_token_string(),
parse_error::create(113, chars_read, exception_message(input_format,
"ndarray dimensional vector is not allowed",
"size"),
nullptr));
2157 std::vector<size_t> dim;
2162 if (dim.size() == 1 || (dim.size() == 2 && dim.at(0) == 1))
2164 result = dim.at(dim.size() - 1);
2178 string_t
key =
"_ArraySize_";
2187 if (result == 0 || result == npos)
2189 return sax->parse_error(chars_read, get_token_string(),
out_of_range::create(408, exception_message(input_format,
"excessive ndarray size caused overflow",
"size"),
nullptr));
2197 return sax->end_array();
2206 auto last_token = get_token_string();
2207 std::string message;
2211 message =
"expected length type specification (U, i, I, l, L) after '#'; last byte: 0x" + last_token;
2215 message =
"expected length type specification (U, i, u, I, m, l, M, L) after '#'; last byte: 0x" + last_token;
2217 return sax->parse_error(chars_read, last_token,
parse_error::create(113, chars_read, exception_message(input_format, message,
"size"),
nullptr));
2231 bool get_ubjson_size_type(std::pair<std::size_t, char_int_type>& result,
bool inside_ndarray =
false)
2233 result.first = npos;
2235 bool is_ndarray =
false;
2241 result.second = get();
2243 &&
JSON_HEDLEY_UNLIKELY(std::binary_search(bjd_optimized_type_markers.begin(), bjd_optimized_type_markers.end(), result.second)))
2245 auto last_token = get_token_string();
2247 exception_message(input_format,
concat(
"marker 0x", last_token,
" is not a permitted optimized array type"),
"type"),
nullptr));
2262 auto last_token = get_token_string();
2264 exception_message(input_format,
concat(
"expected '#' after type information; last byte: 0x", last_token),
"size"),
nullptr));
2267 const bool is_error = get_ubjson_size_value(result.first, is_ndarray);
2272 return sax->parse_error(chars_read, get_token_string(),
parse_error::create(112, chars_read,
2273 exception_message(input_format,
"ndarray can not be recursive",
"size"),
nullptr));
2275 result.second |= (1 << 8);
2282 const bool is_error = get_ubjson_size_value(result.first, is_ndarray);
2285 return sax->parse_error(chars_read, get_token_string(),
parse_error::create(112, chars_read,
2286 exception_message(input_format,
"ndarray requires both type and size",
"size"),
nullptr));
2298 bool get_ubjson_value(
const char_int_type prefix)
2302 case char_traits<char_type>::eof():
2303 return unexpect_eof(input_format,
"value");
2306 return sax->boolean(
true);
2308 return sax->boolean(
false);
2315 std::uint8_t number{};
2316 return get_number(input_format, number) && sax->number_unsigned(number);
2321 std::int8_t number{};
2322 return get_number(input_format, number) && sax->number_integer(number);
2327 std::int16_t number{};
2328 return get_number(input_format, number) && sax->number_integer(number);
2333 std::int32_t number{};
2334 return get_number(input_format, number) && sax->number_integer(number);
2339 std::int64_t number{};
2340 return get_number(input_format, number) && sax->number_integer(number);
2349 std::uint16_t number{};
2350 return get_number(input_format, number) && sax->number_unsigned(number);
2359 std::uint32_t number{};
2360 return get_number(input_format, number) && sax->number_unsigned(number);
2369 std::uint64_t number{};
2370 return get_number(input_format, number) && sax->number_unsigned(number);
2379 const auto byte1_raw = get();
2384 const auto byte2_raw = get();
2390 const auto byte1 =
static_cast<unsigned char>(byte1_raw);
2391 const auto byte2 =
static_cast<unsigned char>(byte2_raw);
2401 const auto half =
static_cast<unsigned int>((byte2 << 8u) + byte1);
2402 const double val = [&half]
2404 const int exp = (half >> 10u) & 0x1Fu;
2405 const unsigned int mant = half & 0x3FFu;
2411 return std::ldexp(mant, -24);
2414 ? std::numeric_limits<double>::infinity()
2415 :
std::numeric_limits<double>::quiet_NaN();
2417 return std::ldexp(mant + 1024,
exp - 25);
2420 return sax->number_float((half & 0x8000u) != 0
2421 ?
static_cast<number_float_t
>(-val)
2422 :
static_cast<number_float_t
>(val),
"");
2428 return get_number(input_format, number) && sax->number_float(
static_cast<number_float_t
>(number),
"");
2434 return get_number(input_format, number) && sax->number_float(
static_cast<number_float_t
>(number),
"");
2439 return get_ubjson_high_precision_number();
2451 auto last_token = get_token_string();
2453 exception_message(input_format,
concat(
"byte after 'C' must be in range 0x00..0x7F; last byte: 0x", last_token),
"char"),
nullptr));
2455 string_t s(1,
static_cast<typename string_t::value_type
>(current));
2456 return sax->string(s);
2462 return get_ubjson_string(s) && sax->string(s);
2466 return get_ubjson_array();
2469 return get_ubjson_object();
2474 auto last_token = get_token_string();
2475 return sax->parse_error(chars_read, last_token,
parse_error::create(112, chars_read, exception_message(input_format,
"invalid byte: 0x" + last_token,
"value"),
nullptr));
2481 bool get_ubjson_array()
2483 std::pair<std::size_t, char_int_type> size_and_type;
2492 if (input_format ==
input_format_t::bjdata && size_and_type.first != npos && (size_and_type.second & (1 << 8)) != 0)
2494 size_and_type.second &= ~(
static_cast<char_int_type
>(1) << 8);
2495 auto it = std::lower_bound(bjd_types_map.begin(), bjd_types_map.end(), size_and_type.second, [](
const bjd_type & p, char_int_type t)
2499 string_t
key =
"_ArrayType_";
2502 auto last_token = get_token_string();
2504 exception_message(input_format,
"invalid byte: 0x" + last_token,
"type"),
nullptr));
2507 string_t type = it->second;
2513 if (size_and_type.second ==
'C')
2515 size_and_type.second =
'U';
2518 key =
"_ArrayData_";
2524 for (std::size_t i = 0; i < size_and_type.first; ++i)
2532 return (sax->end_array() && sax->end_object());
2535 if (size_and_type.first != npos)
2542 if (size_and_type.second != 0)
2544 if (size_and_type.second !=
'N')
2546 for (std::size_t i = 0; i < size_and_type.first; ++i)
2557 for (std::size_t i = 0; i < size_and_type.first; ++i)
2573 while (current !=
']')
2583 return sax->end_array();
2589 bool get_ubjson_object()
2591 std::pair<std::size_t, char_int_type> size_and_type;
2598 if (input_format ==
input_format_t::bjdata && size_and_type.first != npos && (size_and_type.second & (1 << 8)) != 0)
2600 auto last_token = get_token_string();
2602 exception_message(input_format,
"BJData object does not support ND-array size in optimized format",
"object"),
nullptr));
2606 if (size_and_type.first != npos)
2613 if (size_and_type.second != 0)
2615 for (std::size_t i = 0; i < size_and_type.first; ++i)
2630 for (std::size_t i = 0; i < size_and_type.first; ++i)
2651 while (current !=
'}')
2666 return sax->end_object();
2672 bool get_ubjson_high_precision_number()
2676 bool no_ndarray =
true;
2677 auto res = get_ubjson_size_value(size, no_ndarray);
2684 std::vector<char> number_vector;
2685 for (std::size_t i = 0; i < size; ++i)
2692 number_vector.push_back(
static_cast<char>(current));
2698 const auto result_number = number_lexer.scan();
2699 const auto number_string = number_lexer.get_token_string();
2700 const auto result_remainder = number_lexer.scan();
2707 exception_message(input_format,
concat(
"invalid number text: ", number_lexer.get_token_string()),
"high-precision number"),
nullptr));
2710 switch (result_number)
2712 case token_type::value_integer:
2713 return sax->number_integer(number_lexer.get_number_integer());
2714 case token_type::value_unsigned:
2715 return sax->number_unsigned(number_lexer.get_number_unsigned());
2716 case token_type::value_float:
2717 return sax->number_float(number_lexer.get_number_float(), std::move(number_string));
2718 case token_type::uninitialized:
2719 case token_type::literal_true:
2720 case token_type::literal_false:
2721 case token_type::literal_null:
2722 case token_type::value_string:
2723 case token_type::begin_array:
2724 case token_type::begin_object:
2725 case token_type::end_array:
2726 case token_type::end_object:
2727 case token_type::name_separator:
2728 case token_type::value_separator:
2729 case token_type::parse_error:
2730 case token_type::end_of_input:
2731 case token_type::literal_or_value:
2734 exception_message(input_format,
concat(
"invalid number text: ", number_lexer.get_token_string()),
"high-precision number"),
nullptr));
2754 return current = ia.get_character();
2760 char_int_type get_ignore_noop()
2766 while (current ==
'N');
2786 template<
typename NumberType,
bool InputIsLittleEndian = false>
2790 std::array<std::uint8_t,
sizeof(NumberType)> vec{};
2791 for (std::size_t i = 0; i <
sizeof(NumberType); ++i)
2802 vec[
sizeof(NumberType) - i - 1] =
static_cast<std::uint8_t
>(current);
2806 vec[i] =
static_cast<std::uint8_t
>(current);
2811 std::memcpy(&result, vec.data(),
sizeof(NumberType));
2829 template<
typename NumberType>
2831 const NumberType len,
2834 bool success =
true;
2835 for (NumberType i = 0; i < len; i++)
2843 result.push_back(
static_cast<typename string_t::value_type
>(current));
2862 template<
typename NumberType>
2864 const NumberType len,
2867 bool success =
true;
2868 for (NumberType i = 0; i < len; i++)
2876 result.push_back(
static_cast<std::uint8_t
>(current));
2891 return sax->parse_error(chars_read,
"<end of file>",
2900 std::string get_token_string()
const
2902 std::array<char, 3> cr{{}};
2903 static_cast<void>((std::snprintf)(cr.data(), cr.size(),
"%.2hhX",
static_cast<unsigned char>(current)));
2904 return std::string{cr.data()};
2914 const std::string&
detail,
2915 const std::string&
context)
const
2917 std::string error_msg =
"syntax error while parsing ";
2922 error_msg +=
"CBOR";
2926 error_msg +=
"MessagePack";
2930 error_msg +=
"UBJSON";
2934 error_msg +=
"BSON";
2938 error_msg +=
"BJData";
2953 InputAdapterType ia;
2956 char_int_type current = char_traits<char_type>::eof();
2959 std::size_t chars_read = 0;
2968 json_sax_t* sax =
nullptr;
2971#define JSON_BINARY_READER_MAKE_BJD_OPTIMIZED_TYPE_MARKERS_ \
2972 make_array<char_int_type>('F', 'H', 'N', 'S', 'T', 'Z', '[', '{')
2974#define JSON_BINARY_READER_MAKE_BJD_TYPES_MAP_ \
2975 make_array<bjd_type>( \
2976 bjd_type{'C', "char"}, \
2977 bjd_type{'D', "double"}, \
2978 bjd_type{'I', "int16"}, \
2979 bjd_type{'L', "int64"}, \
2980 bjd_type{'M', "uint64"}, \
2981 bjd_type{'U', "uint8"}, \
2982 bjd_type{'d', "single"}, \
2983 bjd_type{'i', "int8"}, \
2984 bjd_type{'l', "int32"}, \
2985 bjd_type{'m', "uint32"}, \
2986 bjd_type{'u', "uint16"})
2994 using bjd_type = std::pair<char_int_type, string_t>;
2999#undef JSON_BINARY_READER_MAKE_BJD_OPTIMIZED_TYPE_MARKERS_
3000#undef JSON_BINARY_READER_MAKE_BJD_TYPES_MAP_