Skip to content
Advertisement

Unexpected character (“) at position 2 JSON Parser (Java)

Here is my JSON File beginning:

JavaScript

And here is my Parser:

JavaScript

I am trying to parse through this JSONfile using a FileReader and JSON and JSON-Simple libraries. I think my format of my JSON file is correct but I don’t know how to get past this error:

JavaScript

Advertisement

Answer

Your JSON is not correct. Kindly check

It should be something like

JavaScript

also the quotes used should "" rather than using “”

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement