Skip to content

Instantly share code, notes, and snippets.

@eam
Created May 14, 2018 23:12
Show Gist options
  • Save eam/898aedaef9946d7df3603a0ea1675192 to your computer and use it in GitHub Desktop.
Save eam/898aedaef9946d7df3603a0ea1675192 to your computer and use it in GitHub Desktop.
booger:~ evan$ cat example.yaml
foo: bar
baz:
- one
- two
- 3
booger:~ evan$ cat example.yaml | ruby -ryaml -rjson -e'puts YAML.load(STDIN.read).to_json'
{"foo":"bar","baz":["one","two",3]}
booger:~ evan$ cat example.yaml | ruby -ryaml -rjson -e'puts YAML.load(STDIN.read).to_json'| ruby -ryaml -rjson -e'puts YAML.load(STDIN.read).to_json'
{"foo":"bar","baz":["one","two",3]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment