Skip to content

Instantly share code, notes, and snippets.

@bbtdev
Forked from chrismytton/yaml2json.sh
Created September 25, 2018 09:36
Show Gist options
  • Save bbtdev/12b02dc925d62192a18ccfd7fb5e6e68 to your computer and use it in GitHub Desktop.
Save bbtdev/12b02dc925d62192a18ccfd7fb5e6e68 to your computer and use it in GitHub Desktop.
Shell function to convert YAML to JSON
yaml2json () {
ruby -r yaml -r json -e 'puts YAML.load($stdin.read).to_json'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment