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

JSON parser cleanups

    • Type: Icon: Improvement Improvement
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • 1.10.0
    • Affects Version/s: None
    • Component/s: json
    • Labels:
      None

      The first frame of the JSON parser stack is never used; it's substituted with a separate bson_t in bson_json_reader_bson_t.bson. Much of the code would be simpler if we use bson_json_reader_bson_t.stack[0].bson as the root object instead. Additionally, there are many checks for "bson_json_reader_bson_t.n > 0" which I believe are always true as the parser descends into the JSON object.

            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: