How can I convert a string to bson by C Driver?

31 views
Skip to first unread message

Bruce Zhao

unread,
Oct 5, 2012, 11:25:07 PM10/5/12
to mongod...@googlegroups.com
I have a string like "{_id:1, GameOrder:1, League:1, Home:1, Away:1, Status:1}", how can I convert this string to a bson struct by C Driver?

Please help me, thanks!


Bruce Zhao


Roman Alexis Anastasini

unread,
Oct 6, 2012, 12:21:58 AM10/6/12
to mongod...@googlegroups.com
Hey Bruce,

This question has been asked about a year ago. Have a look here:

Dunno, if the c drivers have been updated with a build in function for this yet, but this should help as well.

Cheers,
Roman

Roman Alexis Anastasini
Senior Web Developer
CMUNE
--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com
To unsubscribe from this group, send email to
mongodb-user...@googlegroups.com
See also the IRC channel -- freenode.net#mongodb

Bruce Zhao

unread,
Oct 7, 2012, 10:16:52 AM10/7/12
to mongod...@googlegroups.com
Thank you very much!!

2012/10/6 Roman Alexis Anastasini <roman.an...@gmail.com>



--
山贼


Reply all
Reply to author
Forward
0 new messages