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

Query a binary format (BSON, CBOR, MessagePack, UBJSON) #1856

Closed
davidglavas opened this issue Nov 28, 2019 · 2 comments
Closed

Query a binary format (BSON, CBOR, MessagePack, UBJSON) #1856

davidglavas opened this issue Nov 28, 2019 · 2 comments
Labels
kind: question state: stale the issue has not been updated in a while and will be closed automatically soon unless it is updated

Comments

@davidglavas
Copy link

davidglavas commented Nov 28, 2019

Is it possible to serialize a json document as, say, a BSON document and then extract fields out of the BSON document directly?

For example, the mongodb c++ driver offers functions for getting fields out of BSON documents. Is there something similar?

@nlohmann
Copy link
Owner

nlohmann commented Dec 1, 2019

Right now, you first need to parse the binary value before you can access a specific value:

auto j = json::from_bson(x);
auto v = j["my_key"];

@stale
Copy link

stale bot commented Dec 31, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the state: stale the issue has not been updated in a while and will be closed automatically soon unless it is updated label Dec 31, 2019
@stale stale bot closed this as completed Jan 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: question state: stale the issue has not been updated in a while and will be closed automatically soon unless it is updated
Projects
None yet
Development

No branches or pull requests

2 participants