与toString类似,我们是否可以将字符串转换为BSON对象?我需要使用C++驱动程序删除文档,但是remove函数需要查询具有BSON对象。
http://api.mongodb.org/cplusplus/1.5.4/namespacemongo.html#a4f542be0d0f9bad2d8cb32c3436026c2
BSONObj mongo::fromjson ( const string & str )
Create a BSONObj from a JSON <http://www.json.org> string.