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

Cannot deserialize System.Object from BsonType Array

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.4.1
    • Affects Version/s: 1.4
    • Component/s: None
    • Labels:
    • Environment:
      .net framework 2.0

      public class TestInfo
      {
      public string Id

      { get; set; }

      public Object Items { get; set; }

      }

      TestInfo testInfo = new TestInfo();
      testInfo.Id = ObjectId.GenerateNewId().ToString();
      testInfo.Items = new List<string>()

      { "A", "B","C","D","E" }

      ;

      collection.Save<TestInfo>(testInfo);

      var item = collection.FindOneById(testInfo.Id);

      Exception:

      An error occurred while deserializing the Items property of class Test.Program+TestInfo: Cannot deserialize System.Object from BsonType Array.

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            bigtreexu Xu Xinxin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: