Using the MongoDB C# driver, the following code gives me { } in the json variable. It seems to ignore the null value in its serialization.
var document = new BsonDocument{{"x", null}};
var json = document.ToJson();
However I want json to be { "x": null }. Can I set some option for it to serialize null values?