Skip to content

Instantly share code, notes, and snippets.

@hankei6km
Forked from mboersma/yaml2json
Created May 28, 2018 15:57
Show Gist options
  • Save hankei6km/be199f7911e205d54d902618c68fddc4 to your computer and use it in GitHub Desktop.
Save hankei6km/be199f7911e205d54d902618c68fddc4 to your computer and use it in GitHub Desktop.
YAML to JSON one-liner
python -c 'import sys, yaml, json; y=yaml.safe_load(sys.stdin.read()); print(json.dumps(y))'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment