From c94670d8ead4b6d56234d3205447138119bc622c Mon Sep 17 00:00:00 2001 From: Owen Voke Date: Mon, 12 Mar 2018 18:53:35 +0000 Subject: [PATCH] json5: add page (#2024) --- pages/common/json5.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 pages/common/json5.md diff --git a/pages/common/json5.md b/pages/common/json5.md new file mode 100644 index 0000000000..4fd6b273ca --- /dev/null +++ b/pages/common/json5.md @@ -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`