-
-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Closed
Labels
aspect: binary formatsBSON, CBOR, MessagePack, UBJSONBSON, CBOR, MessagePack, UBJSONkind: bugsolution: proposed fixa fix for the issue has been proposed and waits for confirmationa fix for the issue has been proposed and waits for confirmation
Milestone
Description
Description
I am getting this runtime error:
Error converting JSON to BSON ([json.exception.out_of_range.407] integer number 18446744073701195776 cannot be represented by BSON as it does not fit int64
If I comment out use of the uint64_t value in to_json, and from_json, I don't get the error.
This appears to be very similar to Issue #4236, but not sure if it is the same.
If it is the same issue, do we know when 3.11.4 will be released?
Reproduction steps
This code will reproduce it:
uint64_t m_Data0 = 0;
inline void to_json( nlohmann::json& j, const Info& cInfo )
{
j = nlohmann::json{
{ "Data0", cInfo.m_Data0 } };
Expected vs. actual results
I expect to_json to bring the uint64_t into the json object as a uint64_t.
Minimal code example
No response
Error messages
No response
Compiler and operating system
Ubuntu 22.04 LTS
Library version
3.10.5
Validation
- The bug also occurs if the latest version from the
develop
branch is used. - I can successfully compile and run the unit tests.
Metadata
Metadata
Assignees
Labels
aspect: binary formatsBSON, CBOR, MessagePack, UBJSONBSON, CBOR, MessagePack, UBJSONkind: bugsolution: proposed fixa fix for the issue has been proposed and waits for confirmationa fix for the issue has been proposed and waits for confirmation