Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-994

"[{$numberLong: '1'}]" is BSON-encoded with array key name "1"

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.6.0
    • Affects Version/s: None
    • Component/s: json, libbson
    • None

      bson_init_from_json with this input:

      "[ { \"$numberLong\" : \"123\" },  { \"$numberLong\" : \"42\" } ]"
      

      ... 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.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: