YAML conversion tool
npm install @xiyi-tech/yaml-toolsyaml-tools
======
A command-line utility to convert YAML to JSON or JSON to YAML.
Installation
===
``bash`
npm install -g @xiyi-tech/yaml-tools
How use
===
`bashyaml2json --help
Usage: yaml2json [options] [input]
Convert YAML to JSON
Arguments:
input Input file path, this parameter has no effect when running in a pipeline
Options:
-V, --version output the version number
-o, --output
-f, --format Format output json
-h, --help display help for command
`
`bashjson2yaml --help
Usage: json2yaml [options] [input]
Convert JSON to YAML
Arguments:
input Input file path, this parameter has no effect when running in a pipeline
Options:
-V, --version output the version number
-o, --output
-h, --help display help for command
`
Example
===
`bashinput from file, output to stdout
yaml2json ./example.yaml