[CSHARP-429] Cannot deserialize System.Object from BsonType Array Created: 03/Apr/12  Updated: 02/Apr/15  Resolved: 04/Apr/12

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: 1.4
Fix Version/s: 1.4.1

Type: Bug Priority: Major - P3
Reporter: Xu Xinxin Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: deserialize
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

.net framework 2.0


Issue Links:
Related
related to CSHARP-263 Deserialization of array that was ser... Closed

 Description   

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.



 Comments   
Comment by Robert Stam [ 04/Apr/12 ]

This issue is similar to CSHARP-263 but for different data types.

Generated at Wed Feb 07 21:36:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.