开发者

Convert MongoDB BsonDocument into a string

开发者 https://www.devze.com 2023-03-03 18:36 出处:网络
How do a convert an entire MongoDB BsonDocument into 开发者_JAVA百科a string? (I\'m using the official C# driver)You can convert BsonDocument into a JSON formatted string using MongoDB.Bson.BsonExten

How do a convert an entire MongoDB BsonDocument into 开发者_JAVA百科a string?

(I'm using the official C# driver)


You can convert BsonDocument into a JSON formatted string using MongoDB.Bson.BsonExtensionMethods.ToJson.


Code used shown below:

string rc = responseDoc.ToJson<MongoDB.Bson.BsonDocument>();
0

精彩评论

暂无评论...
验证码 换一张
取 消