Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug JSON files

Tags:

json

debugging

There are several errors in my JSON file. What is the best option for debugging JSON files? I used this editor - http://www.jsoneditoronline.org/, but it's a bit difficult to use for long files.

For instance, the error message says:

Error: Parse error on line 1:
...000.0}]}},"data": [{"id": 0,"fr
-----------------------^
Expecting 'EOF', '}', ',', ']', got ':'"

But the line looks fine.

like image 831
Klausos Klausos Avatar asked May 10 '26 01:05

Klausos Klausos


1 Answers

Try putting your JSON file's content into a validator, like http://jsonlint.com/ or http://jsonformatter.curiousconcept.com/ and see what it says.

like image 114
Tholle Avatar answered May 12 '26 15:05

Tholle



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!