A command line tool to easily convert YAML to JSON
Pass it a YAML file and it'll output JSON
$ yaml2json examples/basic.yml
{"age":30,"human":true,"name":"John"}
It will return an exit code if it fails to succesfully parse the YAML.
Running the build script will create executables in the dist
folder. One for Intel macOS, one for ARM macOS, and one for Linux.
$ ./scripts/build
Building yaml2json 💨
Compiling for Intel macOS
👍 dist/yaml2json-darwin-amd64
Compiling for ARM macOS
👍 dist/yaml2json-darwin-arm64
Compiling for Linux
👍 dist/yaml2json-linux-amd64
All done! ✅
git clone git@github.com:buildkite/yaml2json.git
cd yaml2json
direnv allow
go run main.go examples/basic.yml
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)Copyright (c) 2015 Keith Pitt, Buildkite Pty Ltd. See LICENSE for details.