Skip to content

Instantly share code, notes, and snippets.

@jaytaylor
Created August 9, 2018 22:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaytaylor/f11428514269101049a225f20aea802f to your computer and use it in GitHub Desktop.
Save jaytaylor/f11428514269101049a225f20aea802f to your computer and use it in GitHub Desktop.
Python one-liner to convert YAML to JSON
python -c 'import json, sys, yaml ; 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