How to validate Json files?

Table of Contents

Use command-line tools.

These will try to parse and pretty-print the json, and they will give an error if the json file is invalid.

jq

jq . your_file.json

Python

If you have Python installed

python3 -m json.tool your_file.json