Blog Archives

Convert String into MongoDB BsonDocument

Tweet If you have a long string in JSON format, and you want to convert it into a BSONDocument for insertion into a MongoDB database.You can simply do it by defining the query as string json = "{ 'foo' :

Posted in MongoDB, Snippets