Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Formatting XML or JSON
# resource - http://richardlog.com/post/12743073497/pretty-printing-json-and-xml-on-mac-osx
# Formatting XML
cat unformatted.xml | xmllint --format - > formatted.xml
# Formatting JSON
cat unformatted.json | python -m json.tool > formatted.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment