Error Reading JavascriptWithScope in JsonReader

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 3.0.0
    • Affects Version/s: 3.0.0
    • Component/s: JSON
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The following code produces an error

       def c = '{"codeWithScope": {
          "$code": "int x = y",
          "$scope": {
            "y": 1
          }
        }
      }'
      
      new DocumentCodec().decode(new JsonReader(c), DecoderContext.builder().build())
      

      Error: org.bson.json.JsonParseException: JSON reader was expecting a name but found '{'.

              Assignee:
              Robert Guo (Inactive)
              Reporter:
              Robert Guo (Inactive)
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: