Last active
July 22, 2025 11:31
-
-
Save chales/510c5bed59a32ed0cb55 to your computer and use it in GitHub Desktop.
Make JSON legible with BBEdit
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
2016/03/15 | |
Tested with BBEdit 11.5 / OS X 10.11.3 / Python 2.7.10 | |
http://grokin.gs/blog/elegant-json-pretty-print-for-bbedit/ | |
Place the script (or a link to this script) in the ~/Library/Application Support/BBEdit/Text Filters directory | |
Restart BBEdit. | |
The new filter should be under: "Test > Apply Text Filter > bbedit-pretty-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
#!/bin/bash | |
python -c "import sys, json; print json.dumps(json.load(sys.stdin), indent=2)" |
Choose "Reformat Document" from the Text menu to reformat the document's text.
https://www.barebones.com/support/bbedit/notes-14.0.html
Aaah, at last. Bliss!
Thanks for the hint. I updated and it works perfectly. :-)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As of BBEdit 14.0, rather than this custom filter, you can use BBEdit's own built-in module.
https://www.barebones.com/support/bbedit/notes-14.0.html