mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-04 16:43:54 +00:00
Update cheatsheets
This commit is contained in:
18
tldr/python-m-json.tool
Normal file
18
tldr/python-m-json.tool
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# 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`
|
||||
Reference in New Issue
Block a user