Skip to content

Instantly share code, notes, and snippets.

@benc
Created August 19, 2014 09:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benc/34e22a410079c68c1732 to your computer and use it in GitHub Desktop.
Save benc/34e22a410079c68c1732 to your computer and use it in GitHub Desktop.
BBEdit Text Filter to pretty print JSON
#!/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