Last active
December 7, 2021 13:08
-
-
Save atulsingh0/6a77b5517f272fd2e13ab7e0800b7bc6 to your computer and use it in GitHub Desktop.
Yaml to JSON - One Liner in Python/Bash
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
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