--
You received this message because you are subscribed to the Google Groups "BSON" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bson+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
not sure what you are trying to do. after to_json you will get a string something like{ "_id" : ... , "field2" : ... , ... }generally you should only need to convert the bson to json if you are going to output to something outside your application, such as a .json file or perhaps another process via REST.for debugging purposes start with something in the loop such asstring s = to_json(doc);cout << s << endl;
On Tue, Jul 24, 2018 at 6:13 AM, Yashashree Jadhav <yashashre...@gmail.com> wrote:
Hello,I want to parse data from bsoncxx::to_json(doc). Is any one have experience with this.mongocxx::cursor ncursor = collectionpddl.find({});
for(auto doc : ncursor)
{
if( bsoncxx::to_json(doc) == "_id")
{
std::cout << "parse" << "\n";
}
}Kindly help me out.Thank you and Regards.
--
You received this message because you are subscribed to the Google Groups "BSON" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bson+uns...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Deploy, operate and scale MongoDB in the cloud with just a few clickshttps://www.mongodb.com/cloud/atlas
--
You received this message because you are subscribed to the Google Groups "BSON" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bson+uns...@googlegroups.com.