Skip to content

Instantly share code, notes, and snippets.

@tgautier
Created October 24, 2014 09:25
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 tgautier/d61e0c05eb618c96dd4c to your computer and use it in GitHub Desktop.
Save tgautier/d61e0c05eb618c96dd4c to your computer and use it in GitHub Desktop.
[Le Wagon] JSON & Arrays
{
"name": "Paris",
"population": 2211000
}
require "json"
file = File.open('file.json', 'rb')
json_text = file.read
result = JSON.parse(json_text)
p result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment