mirror of
https://github.com/nlohmann/json.git
synced 2026-04-02 22:28:53 +00:00
🔀 merge develop
This commit is contained in:
@@ -2776,7 +2776,7 @@ class binary_reader
|
||||
case 0xFE:
|
||||
{
|
||||
auto last_token = get_token_string();
|
||||
return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, exception_message(input_format_t::bon8, "invalid byte: 0x" + last_token, "value"), BasicJsonType()));
|
||||
return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, exception_message(input_format_t::bon8, "invalid byte: 0x" + last_token, "value"), nullptr));
|
||||
}
|
||||
|
||||
default:
|
||||
|
||||
@@ -1758,7 +1758,7 @@ class binary_writer
|
||||
{
|
||||
if (j.m_value.number_unsigned > static_cast<typename BasicJsonType::number_unsigned_t>((std::numeric_limits<std::int64_t>::max)()))
|
||||
{
|
||||
JSON_THROW(out_of_range::create(407, "integer number " + std::to_string(j.m_value.number_unsigned) + " cannot be represented by BON8 as it does not fit int64", j));
|
||||
JSON_THROW(out_of_range::create(407, "integer number " + std::to_string(j.m_value.number_unsigned) + " cannot be represented by BON8 as it does not fit int64", &j));
|
||||
}
|
||||
write_bon8_integer(static_cast<typename BasicJsonType::number_integer_t>(j.m_value.number_unsigned));
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user