Created
February 12, 2019 11:50
-
-
Save kany/ced4adf38e720cb3242b20b65b95e3eb to your computer and use it in GitHub Desktop.
Formatting XML or JSON
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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