fangyidong / json-simple

A simple Java toolkit for JSON. You can use json-simple to encode or decode JSON text.
Apache License 2.0
746 stars 338 forks source link

getPosition() result from ParseException its diferent that the real character position #142

Open darambulo-vitores opened 3 years ago

darambulo-vitores commented 3 years ago

Hi, in this moment exist a problem with getPosition method, if the parse method fails, a ParseException is throw, in that moment the failed json was [{"nombre"":"diego"},{"nombre":"andre"},{"nombre":"arambulo"}] , actually the error is after the first key(double double quote) the 11th position, but the jar says that is 13th position, its like my string was escaped [{\"nombre\"\":\"diego\"},{\"nombre\":\"andre\"},{\"nombre\":\"arambulo\"}], ....thats wrong.

in fact if i call getUnexpectedObject method, its comes a d from diego word, but the error is the double double quotes.

Screenshot 2021-06-10 014807