Simply copy the jSon or XML into your clipboard and then run one of the following:
pbpaste | python -m json.tool > formatted.json
For XML:
pbpaste | xmllint --format - > formatted.xml
Simply copy the jSon or XML into your clipboard and then run one of the following:
pbpaste | python -m json.tool > formatted.json
For XML:
pbpaste | xmllint --format - > formatted.xml