Skip to content

Instantly share code, notes, and snippets.

View lubosek's full-sized avatar
😍

Lubomir Zrnecko lubosek

😍
View GitHub Profile
@georgkreimer
georgkreimer / gist:537794
Created August 19, 2010 12:44
pretty print json in ruby
require 'json'
my_json = { :array => [1, 2, 3, { :sample => "hash"} ], :foo => "bar" }
puts JSON.pretty_generate(my_json)
Which gets you...
{
"array": [
1,
2,
3,