BsonSerializationException when serializing a Dictionary to BSON
The problem is that the new driver serializes dictionaries as a document by default. The MongoDB C# driver has 3 ways to serialize a dictionary: Document, ArrayOfArrays & ArrayOfDocuments (more on that in the docs). When it serializes as a document the dictionary keys are the names of the BSON element which has some limitations … Read more