15236 {
15237 if ((std::numeric_limits<std::int8_t>::min)() <= n && n <= (std::numeric_limits<std::int8_t>::max)())
15238 {
15239 if (add_prefix)
15240 {
15241 oa->write_character(to_char_type(
'i'));
15242 }
15243
15244 write_number(static_cast<std::int8_t>(n));
15245 }
15246
15247 else if (static_cast<std::int64_t>((std::numeric_limits<std::uint8_t>::min)()) <= n && n <= static_cast<std::int64_t>((std::numeric_limits<std::uint8_t>::max)()))
15248 {
15249 if (add_prefix)
15250 {
15251 oa->write_character(to_char_type(
'U'));
15252 }
15253
15254 write_number(static_cast<std::uint8_t>(n));
15255 }
15256
15257 else if ((std::numeric_limits<std::int16_t>::min)() <= n && n <= (std::numeric_limits<std::int16_t>::max)())
15258 {
15259 if (add_prefix)
15260 {
15261 oa->write_character(to_char_type(
'I'));
15262 }
15263
15264 write_number(static_cast<std::int16_t>(n));
15265 }
15266
15267 else if ((std::numeric_limits<std::int32_t>::min)() <= n && n <= (std::numeric_limits<std::int32_t>::max)())
15268 {
15269 if (add_prefix)
15270 {
15271 oa->write_character(to_char_type(
'l'));
15272 }
15273
15274 write_number(static_cast<std::int32_t>(n));
15275 }
15276
15277 else if ((std::numeric_limits<std::int64_t>::min)() <= n && n <= (std::numeric_limits<std::int64_t>::max)())
15278 {
15279 if (add_prefix)
15280 {
15281 oa->write_character(to_char_type(
'L'));
15282 }
15283
15284 write_number(static_cast<std::int64_t>(n));
15285 }
15286
15287
15288 else
15289 {
15290 if (add_prefix)
15291 {
15292 oa->write_character(to_char_type(
'H'));
15293 }
15294
15295 const auto number = BasicJsonType(n).dump();
15296 write_number_with_ubjson_prefix(number.size(), true);
15297
15298 for (std::size_t i = 0; i < number.size(); ++i)
15299 {
15300 oa->write_character(to_char_type(
static_cast<std::uint8_t
>(number[i])));
15301 }
15302 }
15303
15304
15305 }
output_adapter_t< CharType > oa
the output