Skip to content

Instantly share code, notes, and snippets.

@evdokimovm
Created January 6, 2016 01:19
Show Gist options
  • Save evdokimovm/3e5519330af4fae6998f to your computer and use it in GitHub Desktop.
Save evdokimovm/3e5519330af4fae6998f to your computer and use it in GitHub Desktop.
Ruby Simple Parse JSON file
require 'json'
pets = File.open("file.json", "r")
doc = ""
pets.each do |line|
doc << line
end
pets.close
puts JSON.parse(doc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment