Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-2363

Properly verify the expected field names when parsing extended JSON

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

      A logic error in JsonReader causes it to not properly verify the expected field names for extended JSON documents which have unexpected field names. For example, the following JSON document should be rejected:

      { "$timestamp" : { "i" : 1, "t" : 1234 } }
      

      because the extended JSON spec requires that the 't' field precedes the 'i' field. But due to this bug the 'i' field will be treated as the 't' field, and vice versa.

      Expected result: JsonReader should throw a JsonParseException

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: