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

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Unknown
    • Resolution: Works as Designed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Serialization
    • Labels:
      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

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: