1
0
mirror of https://github.com/nlohmann/json.git synced 2025-08-07 18:02:57 +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:
Michael Valladolid
2025-01-10 22:59:55 +09:00
committed by GitHub
parent 1809b3d800
commit 2d42229f4d
6 changed files with 35 additions and 18 deletions

View File

@@ -328,6 +328,12 @@ class binary_reader
return get_number<std::int64_t, true>(input_format_t::bson, value) && sax->number_integer(value);
}
case 0x11: // uint64
{
std::uint64_t value{};
return get_number<std::uint64_t, true>(input_format_t::bson, value) && sax->number_unsigned(value);
}
default: // anything else not supported (yet)
{
std::array<char, 3> cr{{}};