Skip to content
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 BSON support #1320

Merged
merged 38 commits into from
Oct 27, 2018
Merged

Add BSON support #1320

merged 38 commits into from
Oct 27, 2018

Conversation

nlohmann
Copy link
Owner

Based on #1254, closes #1244.

julian-becker and others added 30 commits September 15, 2018 00:20
…endian input to get rid of `binary_reader::get_number_little_endian`
…of the BSON-output.

This way, the output_adapter can work on simple output iterators and no longer requires random access iterators.
…std::uint64_t` is serialized to BSON. Also, added a missing EOF-check to binary_reader.
…re/bson

 Conflicts:
	include/nlohmann/detail/input/binary_reader.hpp
	single_include/nlohmann/json.hpp
	src/unit-bson.cpp
…in the key-string as part of `out_of_range.409`-message
- added fuzz testers
- added some reference files
- made an exception text more clear
@nlohmann nlohmann added the aspect: binary formats BSON, CBOR, MessagePack, UBJSON label Oct 25, 2018
@nlohmann
Copy link
Owner Author

@julian-becker Anything else to be added to the PR?

Note I did not add the modified sample.json file, because it would just have contributed to a larger repository. Unfortunately, I could not find a common BSON test suite that uses only the features we can convert to JSON. To this end, I think having 100% code coverage and no found error after running a fuzzer locally for 24 hours is good enough at this point.

If you agree, I would merge the PR and prepare a release in the next week.

Copy link
Contributor

@julian-becker julian-becker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good so far, I don't have anything to add at this point.
Thanks a lot for giving everything the finishing touch and for your thorough review!

test/src/fuzzer-parse_bson.cpp Outdated Show resolved Hide resolved
@nlohmann nlohmann added this to the Release 3.3.1 milestone Oct 25, 2018
@nlohmann nlohmann self-assigned this Oct 25, 2018
@coveralls
Copy link

coveralls commented Oct 26, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling 6384fe2 on julian-becker-feature/bson into f102df3 on develop.

@nlohmann nlohmann merged commit 037e93f into develop Oct 27, 2018
@nlohmann nlohmann deleted the julian-becker-feature/bson branch October 27, 2018 14:38
@nlohmann
Copy link
Owner Author

Thanks @julian-becker !

@julian-becker
Copy link
Contributor

Thanks, @nlohmann for creating and maintaining this awesome library, and for letting me contribute a small piece to it!

nlohmann added a commit that referenced this pull request Oct 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BSON support
3 participants