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

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.9.0
    • Component/s: JSON
    • Labels:
      None

      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

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

              Created:
              Updated:
              Resolved: