15311 {
15312 switch (j.type())
15313 {
15315 return 'Z';
15316
15318 return j.m_value.boolean ? 'T' : 'F';
15319
15321 {
15322 if ((std::numeric_limits<std::int8_t>::min)() <= j.m_value.number_integer && j.m_value.number_integer <= (std::numeric_limits<std::int8_t>::max)())
15323 {
15324 return 'i';
15325 }
15326
15327 if ((std::numeric_limits<std::uint8_t>::min)() <= j.m_value.number_integer && j.m_value.number_integer <= (std::numeric_limits<std::uint8_t>::max)())
15328 {
15329 return 'U';
15330 }
15331
15332 if ((std::numeric_limits<std::int16_t>::min)() <= j.m_value.number_integer && j.m_value.number_integer <= (std::numeric_limits<std::int16_t>::max)())
15333 {
15334 return 'I';
15335 }
15336
15337 if ((std::numeric_limits<std::int32_t>::min)() <= j.m_value.number_integer && j.m_value.number_integer <= (std::numeric_limits<std::int32_t>::max)())
15338 {
15339 return 'l';
15340 }
15341
15342 if ((std::numeric_limits<std::int64_t>::min)() <= j.m_value.number_integer && j.m_value.number_integer <= (std::numeric_limits<std::int64_t>::max)())
15343 {
15344 return 'L';
15345 }
15346
15347
15348 return 'H';
15349 }
15350
15352 {
15353 if (j.m_value.number_unsigned <= static_cast<std::uint64_t>((std::numeric_limits<std::int8_t>::max)()))
15354 {
15355 return 'i';
15356 }
15357
15358 if (j.m_value.number_unsigned <= static_cast<std::uint64_t>((std::numeric_limits<std::uint8_t>::max)()))
15359 {
15360 return 'U';
15361 }
15362
15363 if (j.m_value.number_unsigned <= static_cast<std::uint64_t>((std::numeric_limits<std::int16_t>::max)()))
15364 {
15365 return 'I';
15366 }
15367
15368 if (j.m_value.number_unsigned <= static_cast<std::uint64_t>((std::numeric_limits<std::int32_t>::max)()))
15369 {
15370 return 'l';
15371 }
15372
15373 if (j.m_value.number_unsigned <= static_cast<std::uint64_t>((std::numeric_limits<std::int64_t>::max)()))
15374 {
15375 return 'L';
15376 }
15377
15378
15379 return 'H';
15380 }
15381
15383 return get_ubjson_float_prefix(j.m_value.number_float);
15384
15386 return 'S';
15387
15390 return '[';
15391
15393 return '{';
15394
15396 default:
15397 return 'N';
15398 }
15399 }
@ number_integer
number value (signed integer)
@ discarded
discarded by the parser callback function
@ binary
binary array (ordered collection of bytes)
@ object
object (unordered set of name/value pairs)
@ number_float
number value (floating-point)
@ number_unsigned
number value (unsigned integer)
@ array
array (ordered collection of values)