Skip to content

Latest commit

 

History

History
55 lines (35 loc) · 1.17 KB

File metadata and controls

55 lines (35 loc) · 1.17 KB

YAML Tools : Converter

A command-line utility to juggle easily with JSON & YAML.

Usage

Converting YAML to JSON

$ yamltools convert:yaml:json <file.yaml> [<file.json>]

which is equivalent to:

$ cat file.yaml | yamltools convert:yaml:json [<file.json>]

Or using the short-hand wrapper script

$ yaml2json <file.yaml> [<file.json>]

Arguments:

  • file.yaml The YAML file to read from (- or left empty for standard input).
  • file.json The (optional) JSON file to write output to. If no file specified, write to standard output.

Converting JSON to YAML

$ yamltools convert:json:yaml <file.json> [<file.yaml>]

which is equivalent to:

$ cat file.json | yamltools convert:json:yaml [<file.yaml>]

Or using the short-hand wrapper script:

$ json2yaml <file.json> [<file.yaml>]

Arguments:

  • file.json The JSON file to read from (- or left empty for standard input).
  • file.yaml The (optional) YAML file to write output to. If no file specified, write to standard output.