summaryrefslogtreecommitdiffstats
path: root/yaml2json.py
blob: 2aa315ea87d524b0b6e4551e056d63cf8b5f0ba8 (plain)
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/env python
# convert yaml to json
# pip3 install pyyaml
# http://pyyaml.org/wiki/PyYAMLDocumentation
# py3 yaml2json.py < ~/code/manpow/homeland/heartland/puphpet/config.yaml
# gist https://gist.github.com/noahcoad/51934724e0896184a2340217b383af73

import yaml, json, sys
sys.stdout.write(json.dumps(yaml.load(sys.stdin), sort_keys=True, indent=2))