Created
September 16, 2023 11:32
-
-
Save sonnyksimon/8f70609467eef3e7a2b2de4022617e75 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/sh | |
# yaml2json | |
cat myFile.yml | python -c 'import yaml; import json; import sys; f = sys.stdin.read(); conf = yaml.safe_load(f); out = json.dumps(conf, separators=(",",":")); print(out)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment