-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for BSON element 11: uint64 #4380
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the patience. The code looks good, but the documentation needs adjustment:
- https://github.com/nlohmann/json/blob/develop/docs/mkdocs/docs/home/exceptions.md: remove BSON from the description of
json.exception.out_of_range.407
- https://github.com/nlohmann/json/blob/develop/docs/mkdocs/docs/features/binary_formats/bson.md: adjust mapping tables
Thanks for the review. Documentation updated in latest. Please let me know if I've missed anything else. |
Coverage went down. Can you please check if a test is missing? |
This PR adds support for decoding and encoding BSON element 11: 64bit unsigned int.
This resolves #3894.
Changes
0x11
correctly asuint64_t
.write_bson_unsigned
to encode unsigned 64bit values correctly (using0x11
instead of signed0x12
).uint64_t
.Reference
Pull request checklist
include/nlohmann
directory, runmake amalgamate
to create the single-header filessingle_include/nlohmann/json.hpp
andsingle_include/nlohmann/json_fwd.hpp
. The whole process is described here.