1 Error message
2. My jason
give a try on the following part:
and change to
Have a look here:, where the JSON can be validated in advance also helpfully for issue analysis:
Why did this happen?
It is because at line 7 you have an invalid Json character. Json strings a very strict with respect to what kind of special characters you can use. In line 7 you have used the backslash " \ ".
When I use your string in Visual Studio Code:
How to fix this error?
Simply replace the one backslash with two backslash and the error will go away
How to check json strings quicky without IDEs?
Open the json file in mozilla or any modern browser, if the string has formatting issues you will get an error else you will get a nice formatted text.
- Here is an excellent starter on JSON strings: Learn JSON - Full Crash Course for Beginners - YouTube
- JSON escape characters: JSON.simple - Escaping Special Characters
Hope this helps!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.