3

When i convert bson to string using the following :

var stringDoc = LiteDB.JsonSerializer.Serialize(bsonDocument);

i'm getting the following :

{"_id":{"$oid":"62f3c9299c37811224131269"},"Name":"John Doe","Phone":"0778636316"}

When i try to convert back to bsonDocument using the following instruction :

BsonDocument bsonDocument = BsonMapper.Global.ToDocument(stringDoc);

I'm getting null in the bsonDocument variable.

Ahmed HM
  • 110
  • 1
  • 9
  • Can the answer to this question https://stackoverflow.com/questions/59210669/convert-string-into-litedb-bsondocument be helpful for you? – h.m.i.13 Sep 28 '22 at 08:12

0 Answers0