A simple CLI tool to convert a YAML file into JSON. Written in Go.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
You need to have Go installed in order to build/install this tool.
go build ./cmd/yson
go test yson.com/yson...
From the project folder run:
go install yson.com/yson...
Make sure GOPATH/bin
is in your $PATH
. To check your GOPATH
run:
go env GOPATH
./yson <filename>.yaml
If you have the executable in your $PATH:
yson <filename>.yaml
You can also use a pipe to pass yaml data:
cat file.yaml | yson
[--raw] Prints the raw string instead of the default 'pretty' printed version.
yson --raw <filename>.yaml