Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-1502

Extended JSON parsing mishandles invalid $code

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.3.2
    • Affects Version/s: 1.3.0
    • Component/s: JSON & ExtJSON
    • None

      When parsing this document:

      {"":{"$code":"", "0":{}}}
      

      The follow error is received: "invalid JSON input; expected value for javascript". This should error due to an erroneous key next to $code.

      This document fails to error and produces an incorrect document:

      {"":{"$code":"abc", "0":""}}
      0c0000000d00010000000000
      

      Note that "abc" does not appear in the output.
       

            Assignee:
            divjot.arora@mongodb.com Divjot Arora (Inactive)
            Reporter:
            david.golden@mongodb.com David Golden
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: