MongoDB.Bson.Serialization.Serializers.DictionarySerializer do not support empty string as key.

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • 1.8
    • Affects Version/s: 1.6.1, 1.7
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In C# it is ok create the following code:

      var dic = new Dictionary<string,int> {

      {"", 1}

      , {"test", 2}};

      but this dictionary can't get serialized when it has an empty string as key.

      See: https://github.com/mongodb/mongo-csharp-driver/blob/master/Bson/Serialization/Serializers/DictionarySerializer.cs#L178

              Assignee:
              Robert Stam
              Reporter:
              Michael Bertelsen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: