Created
March 12, 2012 21:49
-
-
Save bensonk/2024937 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env ruby | |
require 'json' | |
my_hash = JSON.load(File.open('my_hash.json')) | |
puts my_hash |
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
source :rubygems | |
gem '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
#!/usr/bin/env ruby | |
require 'json' | |
my_hash = { :foo => 'bar', :baz => 'bat', :blargh => 42 } | |
JSON.dump my_hash, File.open('my_hash.json', 'w') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment