Skip to content

Instantly share code, notes, and snippets.

@atulsingh0
Last active December 7, 2021 13:08
Show Gist options
  • Save atulsingh0/6a77b5517f272fd2e13ab7e0800b7bc6 to your computer and use it in GitHub Desktop.
Save atulsingh0/6a77b5517f272fd2e13ab7e0800b7bc6 to your computer and use it in GitHub Desktop.
Yaml to JSON - One Liner in Python/Bash
alias yml2json='python -c "import sys, yml, json; print json.safe_dump(yaml.loads(sys.stdin.read()))"'
## Usage
##
##
## cat yaml_file | yml2json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment