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

JSON.parse should throw an exception if the input string is not fully consumed

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • 2.9.0
    • JSON
    • None

    Description

      This:

              String str = "{x : 1}, y : 1";
              DBObject parsedJSON = (DBObject) JSON.parse(str);

      produces a DBObject equivalent to:

              new BasicDBObject(x, 1)

      It should throw an exception instead

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: