JSON_THROW(type_error::create(317,j.diagnostics()+"to serialize to BSON, top-level type must be object, but is "+std::string(j.type_name())));
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(out_of_range::create(407,j.diagnostics()+"integer number "+std::to_string(j.m_value.number_unsigned)+" cannot be represented by BSON as it does not fit int64"));
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)));