posix4e / json-smart

Automatically exported from code.google.com/p/json-smart
1 stars 0 forks source link

JSONStringParser allows trailing junk #20

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a JSONParser with any mode.
2. jsonParser.parse("[1]1");
3. No exceptions are thrown.

What is the expected output? What do you see instead?

Some exception indicating that there are trailing characters.

What version of the product are you using? On what operating system?

1.0.9-1

Please provide any additional information below.

In 
http://code.google.com/p/json-smart/source/browse/1.0.X/json-smart/src/main/java
/net/minidev/json/parser/JSONStreamParser.java

readMain() simply does "return readArray();" for example. It would need to do 
the readArray() but then check for additional non-whitespace and throw an error 
if it is found.

Original issue reported on code.google.com by rgrzywin...@yahoo.com on 7 Dec 2011 at 4:29

GoogleCodeExporter commented 9 years ago

Original comment by uriel.chemouni on 17 Dec 2011 at 8:06

GoogleCodeExporter commented 9 years ago

Original comment by uriel.chemouni on 5 Mar 2012 at 1:42