JSON_THROW(type_error::create(317,"to serialize to BSON, top-level type must be object, but is "+std::string(j.type_name()),detail::diagnostics_t<BasicJsonType>(j)));;
JSON_THROW(type_error::create(317,"to serialize to BSON, top-level type must be object, but is "+std::string(j.type_name()),diagnostics_t(j)));;
JSON_THROW(out_of_range::create(407,"integer number "+std::to_string(j.m_value.number_unsigned)+" cannot be represented by BSON as it does not fit int64",detail::diagnostics_t<BasicJsonType>(j)));
JSON_THROW(out_of_range::create(407,"integer number "+std::to_string(j.m_value.number_unsigned)+" cannot be represented by BSON as it does not fit int64",diagnostics_t(j)));
using string_t = typename BasicJsonType::string_t;
using string_t = typename BasicJsonType::string_t;
using binary_t = typename BasicJsonType::binary_t;
using binary_t = typename BasicJsonType::binary_t;
using number_float_t = typename BasicJsonType::number_float_t;
using number_float_t = typename BasicJsonType::number_float_t;
using diagnostics_t = detail::diagnostics_t<BasicJsonType>;
public:
public:
/*!
/*!
...
@@ -13020,7 +13021,7 @@ class binary_writer
...
@@ -13020,7 +13021,7 @@ class binary_writer
default:
default:
{
{
JSON_THROW(type_error::create(317,"to serialize to BSON, top-level type must be object, but is "+std::string(j.type_name()),detail::diagnostics_t<BasicJsonType>(j)));;
JSON_THROW(type_error::create(317, "to serialize to BSON, top-level type must be object, but is " + std::string(j.type_name()), diagnostics_t(j)));;
}
}
}
}
}
}
...
@@ -13869,7 +13870,7 @@ class binary_writer
...
@@ -13869,7 +13870,7 @@ class binary_writer
const auto it = name.find(static_cast<typename string_t::value_type>(0));
const auto it = name.find(static_cast<typename string_t::value_type>(0));
if (JSON_HEDLEY_UNLIKELY(it != BasicJsonType::string_t::npos))
if (JSON_HEDLEY_UNLIKELY(it != BasicJsonType::string_t::npos))
{
{
JSON_THROW(out_of_range::create(409,"BSON key cannot contain code point U+0000 (at byte "+std::to_string(it)+")",detail::diagnostics_t<BasicJsonType>(j)));
JSON_THROW(out_of_range::create(407,"integer number "+std::to_string(j.m_value.number_unsigned)+" cannot be represented by BSON as it does not fit int64",detail::diagnostics_t<BasicJsonType>(j)));
JSON_THROW(out_of_range::create(407, "integer number " + std::to_string(j.m_value.number_unsigned) + " cannot be represented by BSON as it does not fit int64", diagnostics_t(j)));
}
}
}
}
...
@@ -15720,6 +15721,7 @@ class serializer
...
@@ -15720,6 +15721,7 @@ class serializer
using number_integer_t = typename BasicJsonType::number_integer_t;
using number_integer_t = typename BasicJsonType::number_integer_t;
using number_unsigned_t = typename BasicJsonType::number_unsigned_t;
using number_unsigned_t = typename BasicJsonType::number_unsigned_t;
using binary_char_t = typename BasicJsonType::binary_t::value_type;
using binary_char_t = typename BasicJsonType::binary_t::value_type;
using diagnostics_t = detail::diagnostics_t<BasicJsonType>;
static constexpr std::uint8_t UTF8_ACCEPT = 0;
static constexpr std::uint8_t UTF8_ACCEPT = 0;
static constexpr std::uint8_t UTF8_REJECT = 1;
static constexpr std::uint8_t UTF8_REJECT = 1;
...
@@ -16175,7 +16177,7 @@ class serializer
...
@@ -16175,7 +16177,7 @@ class serializer
{
{
std::string sn(3, '\0');
std::string sn(3, '\0');
(std::snprintf)(&sn[0], sn.size(), "%.2X", byte);
(std::snprintf)(&sn[0], sn.size(), "%.2X", byte);
JSON_THROW(type_error::create(316,"invalid UTF-8 byte at index "+std::to_string(i)+": 0x"+sn,detail::diagnostics_t<BasicJsonType>()));
JSON_THROW(type_error::create(316, "invalid UTF-8 byte at index " + std::to_string(i) + ": 0x" + sn, diagnostics_t()));