Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-2030

Add allowDuplicateElementNames to BsonDocument.Parse

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • API

    Description

      In my application I have to work with jsons which contains duplicate names:

      { "a" : "qqq", "a" : "qqq" }
      

      It is very convenient to parse json by BsonDocument.Parse, but it fails on json containing duplicate names:

      System.InvalidOperationException : Duplicate element name 'a'.
      

      It will be cool if we'll add a method with signature:

      BsonDocument Parse(string json, bool allowDuplicateElementNames)
      

      Attachments

        Activity

          People

            robert@mongodb.com Robert Stam
            ar7z1 Artem Zinenko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: