mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-07-24 08:55:33 +02:00
json5: add page (#2024)
This commit is contained in:
parent
b0906952ef
commit
c94670d8ea
1 changed files with 27 additions and 0 deletions
27
pages/common/json5.md
Normal file
27
pages/common/json5.md
Normal file
|
@ -0,0 +1,27 @@
|
|||
# json5
|
||||
|
||||
> A command-line tool for converting JSON5 files to JSON.
|
||||
|
||||
- Convert JSON5 stdin to JSON stdout:
|
||||
|
||||
`echo {{input}} | json5`
|
||||
|
||||
- Convert a JSON5 file to JSON and output to stdout:
|
||||
|
||||
`json5 {{path/to/input_file.json5}}`
|
||||
|
||||
- Convert a JSON5 file to the specified JSON file:
|
||||
|
||||
`json5 {{path/to/input_file.json5}} --out-file {{path/to/output_file.json}}`
|
||||
|
||||
- Validate a JSON5 file:
|
||||
|
||||
`json5 {{path/to/input_file.json5}} --validate`
|
||||
|
||||
- Specify the number of spaces to indent by (or "t" for tabs):
|
||||
|
||||
`json5 --space {{indent_amount}}`
|
||||
|
||||
- View available options:
|
||||
|
||||
`json5 --help`
|
Loading…
Add table
Reference in a new issue