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

    • Type: Icon: Task Task
    • Resolution: Works as Designed
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: Serialization
    • None

      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.

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

              Created:
              Updated:
              Resolved: