mirror of
https://github.com/nlohmann/json.git
synced 2025-08-09 05:22:48 +03:00
Support BSON uint64 de/serialization (#4590)
* Support BSON uint64 de/serialization Signed-off-by: Michael Valladolid <mikevalladolid@gmail.com> * Treat 0x11 as uint64 and not timestamp specific Signed-off-by: Michael Valladolid <mikevalladolid@gmail.com> --------- Signed-off-by: Michael Valladolid <mikevalladolid@gmail.com>
This commit is contained in:
committed by
GitHub
parent
1809b3d800
commit
2d42229f4d
@@ -1097,7 +1097,8 @@ class binary_writer
|
||||
}
|
||||
else
|
||||
{
|
||||
JSON_THROW(out_of_range::create(407, concat("integer number ", std::to_string(j.m_data.m_value.number_unsigned), " cannot be represented by BSON as it does not fit int64"), &j));
|
||||
write_bson_entry_header(name, 0x11 /* uint64 */);
|
||||
write_number<std::uint64_t>(static_cast<std::uint64_t>(j.m_data.m_value.number_unsigned), true);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user