Skip to content

Instantly share code, notes, and snippets.

@djromero
Last active June 8, 2017 19:42
Show Gist options
  • Save djromero/4286dc6886575906f6b2951a0f097e09 to your computer and use it in GitHub Desktop.
Save djromero/4286dc6886575906f6b2951a0f097e09 to your computer and use it in GitHub Desktop.
json --> yaml
# convert JSON to YAML
# Requires: PyYAML
alias json2yaml="python -c 'import json;import yaml;import sys;print(yaml.dump(json.load(sys.stdin), default_flow_style=False))'"
# Usage:
curl example.com/whatever.json | json2yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment