[CSHARP-16] Document object does not map to JSON causing data to be translated incorrectly Created: 22/Feb/10  Updated: 02/Mar/10  Resolved: 02/Mar/10

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

Type: Bug Priority: Critical - P2
Reporter: Syed Saleem Javid Brahmanapalli Assignee: Sam Corder
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

he document object does not correctly translate JSON. It converts arrays into objects.
This breaks some basic assumptions when expect an array but we end up getting object literals.

Here is an example.

Consider the following data is present in the MongoDB

{"_id" : 5 , "arr" : [["one","two"],["three","four"],

{"id" : "six"}

]}

When you read this data using the driver the result is returned as a document.
This document looks like

{ "_id": 5, "arr": { "0": [ "one", "two" ], "1": [ "three", "four" ], "2":

{ "id": "six" }

} }

The entire array is converted into an object.



 Comments   
Comment by Sam Corder [ 02/Mar/10 ]

Fixed in 0.81

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