Pretty print JSON using the command line tools

Anurag Rana - Jul 11 '19 - - Dev Community

Option 1. Using python
cat FileName.json | python -m json.tool

Option 2. Colors and multiple options.
cat FileName.json~ | jq ''

Option 3. Pretty print with syntax highlighting.
echo '{"foo": "bar"}' | python -m json.tool | pygmentize -g

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player