w = "{'response':{'id':'19999','period':'5','fieldList':[{'date':'2016-06-23','time':'00:01:07'},{'date':'2016-06-23','time':'00:06:07'}]}}"
uri = URI(price_api) price_data = Net::HTTP.get(uri) 使用如上方法获取 api 的结果是一个字符串 如上字符串如何才能转换成 hash?
h = eval(w)
require 'safe_yaml' YAML.load(w)
@classicalliu @nouse 谢谢!
MultiJson.load(price_data)