Groups
Groups
Sign in
Groups
Groups
mongodb-user
Conversations
About
Send feedback
Help
C# - Converting JSON string to BSON document
4,205 views
Skip to first unread message
Dan
unread,
Apr 14, 2011, 11:58:58 PM
4/14/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongodb-user
In C#, is there a way to convert a JSON string to a BSON document? I
ask this so I can pass this to the find(query) method.
So, basically, I want to do something like this:
var q = "{magicnumber:2600}".toBson()
Thanks!
Robert Stam
unread,
Apr 15, 2011, 12:09:58 AM
4/15/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongodb-user
You can use:
var q = BsonSerializer.Deserialize<QueryDocument>("{ magicnumber:
2600 }");
Reply all
Reply to author
Forward
0 new messages