Created
October 19, 2016 15:32
-
-
Save chrismytton/abb68121e90eea778c86ecac70f417d3 to your computer and use it in GitHub Desktop.
Shell function to convert YAML to JSON
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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