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

Properly verify the expected field names when parsing extended JSON

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 3.5.0
    • None
    • JSON
    • None

    Description

      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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: