Skip to content

Instantly share code, notes, and snippets.

View Scags's full-sized avatar

Scags

View GitHub Profile
@Scags
Scags / json2yaml.py
Created August 7, 2020 22:21
JSON to YAML
import json
import yaml
import sys
def main():
with open(sys.argv[1], "r") as f:
j = json.load(f)
with open(sys.argv[1].replace("json", "yml"), "w") as f:
yaml.safe_dump(j, f, default_flow_style = False, width = 999999)