Skip to content

Instantly share code, notes, and snippets.

@benc
Created August 19, 2014 09:29
Show Gist options
  • 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