mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-07-04 04:15:23 +02:00

Co-authored-by: Wiktor Perskawiec <wiktor@perskawiec.cc> Co-authored-by: Managor <42655600+Managor@users.noreply.github.com> Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com> Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
13 lines
368 B
Markdown
13 lines
368 B
Markdown
# 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`
|