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

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: 2.9.0
    • Component/s: JSON
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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
            Reporter:
            Jeffrey Yemin
            None
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: