Skip to content

Instantly share code, notes, and snippets.

@shubhamagarwal92
Created January 16, 2019 19:37
Show Gist options
  • Save shubhamagarwal92/c5e238bd80a6a1c6dadceb3fcf75be94 to your computer and use it in GitHub Desktop.
Save shubhamagarwal92/c5e238bd80a6a1c6dadceb3fcf75be94 to your computer and use it in GitHub Desktop.
# Run as
# json_beautify.sh bad_json.json beautify.json
# https://stackoverflow.com/questions/352098/how-can-i-pretty-print-json-in-a-shell-script
python -m json.tool $1 > $2
# if the JSON is from an internet source such as an API, you can use
# curl http://my_url/ | python -m json.tool
# For further processing json in python, a good source
# https://www.dataquest.io/blog/python-json-tutorial/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment