With the NET/HTTP library, you can get the content of a distant file.
Then with the JSON library you can parse a json string into a hash.
def get_datas
url = URI.parse("http://www.example.com/page.json")
res = Net::HTTP.start(url.host, url.port) {|http|
http.get(url.path)
}
JSON.parse res.body
end