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

System.InvalidOperationException: 'An Array value cannot be written to the root level of a BSON document.' when using MongoDB.Bson version 2.11.0 or higher

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Works as Designed
    • Icon: Unknown Unknown
    • None
    • None
    • Serialization
    • None

    Description

      Running the code in the attached project results in an exception:

      System.InvalidOperationException: 'An Array value cannot be written to the root level of a BSON document.'

      when using MongoDB.Bson version 2.11.0 or higher.

      The issue does not reproduce when using 2.10.4 or lower.

      It seems to be related to CSHARP-2877.

      Attachments

        Activity

          People

            james.kovacs@mongodb.com James Kovacs
            johnjames.smith75@protonmail.com John James Smith
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: