commands.sh

python -m json.tool

all

Validate and pretty-print JSON data. Part of Python's standard library.

More info →

Examples (2)

Pretty-print JSON from a file

python -m json.tool path/to/file.json

Validate and pretty-print JSON from `stdin`

echo '{"key": "value"}' | python -m json.tool
made by @shridhargupta | data from tldr-pages