[CDRIVER-994] "[{$numberLong: '1'}]" is BSON-encoded with array key name "1" Created: 12/Nov/15 Updated: 10/Jul/17 Resolved: 10/Dec/16 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | json, libbson |
| Affects Version/s: | None |
| Fix Version/s: | 1.6.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | A. Jesse Jiryu Davis | Assignee: | A. Jesse Jiryu Davis |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| Description |
|
bson_init_from_json with this input:
... encodes an array with keys "1", "3", instead of the expected "0", "1". Something on the parser stack isn't popped after finishing a parse of an extended-JSON map like {$numberLong: "123"}, and array keys are incremented twice between BSON elements. |
| Comments |
| Comment by Githook User [ 10/Jul/17 ] |
|
Author: {u'username': u'jmikola', u'name': u'Jeremy Mikola', u'email': u'jmikola@gmail.com'}Message: Fixed in libbson 1.6.0 by |
| Comment by Githook User [ 10/Dec/16 ] |
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: The BSON array keys produced from parsing JSON like this: [{$numberLong: "123"}, {$numberLong: "456"}] Had been "1", "3" instead of the correct "0", "1". |
| Comment by Githook User [ 09/Feb/16 ] |
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}Message: |
| Comment by A. Jesse Jiryu Davis [ 13/Nov/15 ] |
|
Once fixed, update _test_kill_cursors to use match_json like other mock server tests do. |
| Comment by A. Jesse Jiryu Davis [ 12/Nov/15 ] |
|
Reproduction. |