-
Notifications
You must be signed in to change notification settings - Fork 163
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
How to serialize a hashmap into BSON? #1083
Comments
Hey @Bryson14, thanks for opening this issue! You should be able to use this First, the
Or, if possible, you can just construct your map with Second, you'll need to convert your map into a
Putting it all together:
That said, passing a map like yours directly into the |
That looks great! after I send that, I realized I could do something like this also:
This is fine for serializing. But for deserializng the data as is coming from the database as a bson::Document, I haven't tested if that would work, or if more work is needed for that. |
You should be able to use |
There has not been any recent activity on this ticket, so we are marking it as stale. If we do not hear anything further from you, this issue will be automatically closed in one week. |
There has not been any recent activity on this ticket, so we are closing it. Thanks for reaching out and please feel free to file a new issue if you have further questions. |
Using rust 1.77 and mongodb 2.8.2
How can i serialize a hashmap of strings into mongodb as a Tag Based Aquisition System.
For example:
The text was updated successfully, but these errors were encountered: