Convert YAML to JSON
$ yaml2json input.yaml # Output JSON to standard output
- GitHub Releases: Download asset from GitHub Releases and install the executable binary in
PATH
- Homebrew:
$ brew install suzuki-shunsuke/yaml2json/yaml2json
This is very simple.
- Read YAML with gopkg.in/yaml.v2
- Convert
map[interface{}]interface{}
tomap[string]interface{}
with suzuki-shunsuke/go-convmap - Output JSON to the Standard Output with encoding/json
We know there are already some tools to convert YAML to JSON, but we develop this tool, because we want a single executable binary for macOS, Linux / AMD64, ARM64. Unfortunately, we can't find a single executable binary for Linux ARM64.