Created
August 6, 2021 15:40
-
-
Save fazlearefin/f7395d8299271032ea8600c945952aee to your computer and use it in GitHub Desktop.
Convert a json file to yaml
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/env python3 | |
import yaml | |
import sys | |
import json | |
OUT=open('output.yaml','w') | |
IN=open(sys.argv[1], 'r') | |
JSON = json.load(IN) | |
IN.close() | |
yaml.dump(JSON, OUT) | |
OUT.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment