1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-04 02:15:23 +02:00
tldr/pages/common/python-m-json.tool.md

14 lines
368 B
Markdown
Raw Normal View History

# python -m json.tool
> Validate and pretty-print JSON data.
> Part of Python's standard library.
> More information: <https://docs.python.org/library/json.html#module-json.tool>.
- Pretty-print JSON from a file:
`python -m json.tool {{path/to/file.json}}`
- Validate and pretty-print JSON from standard input:
`echo '{{{"key": "value"}}}' | python -m json.tool`