|
| 1 | +.TH yaml2json "1" "December 15, 2023" "" "yaml2json manual" |
| 2 | + |
| 3 | +.SH NAME |
| 4 | +yaml2json - Converts YAML input to JSON/JSON5 output. |
| 5 | + |
| 6 | +.SH SYNOPSIS |
| 7 | +.B yaml2json |
| 8 | +[-o|--output |
| 9 | +.I file |
| 10 | +] [-m|--mode |
| 11 | +.I |
| 12 | +mode |
| 13 | +] [-w|--overwrite] |
| 14 | +.br |
| 15 | +[-p|--pretty] [-k|--check] [-a|--compact] [-t|--trailing-commas] |
| 16 | +.br |
| 17 | +[-s|--single-quotes] [--escape-slashes] [--escape-unicode] |
| 18 | +.br |
| 19 | +[-l|--line-break] [-V|--version] [-h|--help] |
| 20 | +[ |
| 21 | +.I [file ...] |
| 22 | +] |
| 23 | +.RE |
| 24 | + |
| 25 | +.SH DESCRIPTION |
| 26 | +yaml2json converts YAML input to JSON/JSON5 output. |
| 27 | + |
| 28 | +.SH ARGUMENTS |
| 29 | +.B |
| 30 | +.IP "file" |
| 31 | +read the JSON/JSONC/JSON5 input from a file |
| 32 | + |
| 33 | +.SH OPTIONS |
| 34 | +.B |
| 35 | +.IP "-o|--output file" |
| 36 | +write the JSON output to a file |
| 37 | +.B |
| 38 | +.IP "-t|--trailing-commas" |
| 39 | +insert trailing commas to arrays and objects |
| 40 | +.B |
| 41 | +.IP "-s|--single-quotes" |
| 42 | +format single-quoted instead of double-quoted strings |
| 43 | +.B |
| 44 | +.IP "--escape-slashes" |
| 45 | +escape slashes by by prefixing them with a backslash |
| 46 | +.B |
| 47 | +.IP "--escape-unicode" |
| 48 | +escape multibyte Unicode characters with \u literals |
| 49 | +.B |
| 50 | +.IP "-l|--line-break" |
| 51 | +append a line break to the JSON output |
| 52 | +.B |
| 53 | +.IP "-p|--pretty" |
| 54 | +print the JSON output with line breaks and indented |
| 55 | +.B |
| 56 | +.IP "-V|--version" |
| 57 | +print the version of the executable and exit |
| 58 | +.B |
| 59 | +.IP "-h|--help" |
| 60 | +print the usage information and exit |
| 61 | + |
| 62 | +.RE |
| 63 | +If no input file is specified, it will be read from standard input. |
| 64 | + |
| 65 | +.SH EXAMPLES |
| 66 | +.B |
| 67 | +.IP "yaml2json config.yaml -o config.json -lp" |
| 68 | +Covert a file with prettifying and ensuring a trailing line break. |
| 69 | +.B |
| 70 | +.IP "cat config.yaml | yaml2json > config.json" |
| 71 | +Covert a file minifying the result. |
| 72 | + |
| 73 | +.SH BUGS |
| 74 | +yaml2json's bug tracker is located at <https://github.com/prantlf/v-yaml2json/issues> |
| 75 | + |
| 76 | +.SH DOCUMENTATION |
| 77 | +See the website for documentation <https://github.com/prantlf/v-yaml2json#readme> |
| 78 | + |
| 79 | +.SH AUTHOR |
| 80 | +Currently maintained by Ferdinand Prantl <prantlf@gmail.com> |
0 commit comments