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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 1.6.0
    • Affects Version/s: None
    • Component/s: json, libbson
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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:
              A. Jesse Jiryu Davis
              Reporter:
              A. Jesse Jiryu Davis
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: