I\'m working with C# MongoDB driver and I have this rather complex JSON struct to save:
{
\"name\" : \"value\",
\"age\": 1,
\"isFemale\": true,
Try to read the documentation more carefully, within the Serializer Registry section (http://mongodb.github.io/mongo-csharp-driver/2.4/reference/bson/serialization/#serializer-registry):
The serializer registry contains all the IBsonSerializers that have been registered. It can be accessed via the SerializerRegistry property of the static class BsonSerializer.
To register a serializer use either
BsonSerializer.RegisterSerializer(Type, IBsonSerializer)
or
BsonSerializer.RegisterSerializer(IBsonSerializer)
This will add them to
BsonSerializer.SerializerRegistry
Checkout the APIs for these classes here - http://mongodb.github.io/mongo-csharp-driver/2.4/apidocs/html/T_MongoDB_Bson_Serialization_BsonSerializer.htm