Created
January 6, 2016 01:19
-
-
Save evdokimovm/3e5519330af4fae6998f to your computer and use it in GitHub Desktop.
Ruby Simple Parse JSON file
This file contains 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
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