Created
August 19, 2014 09:29
-
-
Save benc/34e22a410079c68c1732 to your computer and use it in GitHub Desktop.
BBEdit Text Filter to pretty print JSON
This file contains 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
#!/usr/bin/env ruby | |
# encoding: UTF-8 | |
require 'json' | |
ARGF.set_encoding(Encoding::UTF_8) | |
puts JSON.pretty_generate(JSON.parse(ARGF.read)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment