我收到了来自 forecast.io api 的 json 响应
JSON.parse(open("https://api.forecast.io/forecast/api-key/latitude,longitude").read)
它看起来像这样
{"latitude"=>58.5942,
"longitude"=>16.1826,
"timezone"=>"Europe/Stockholm",
"offset"=>2,
"currently"=>{
"time"=>1367829429,
"summary"=>"Clear",
"icon"=>"clear-day",
"precipIntensity"=>0,
"temperature"=>59.04,
"dewPoint"=>41.6,
"windSpeed"=>11.49,
"windBearing"=>224,
"cloudCover"=>0.08,
"humidity"=>0.53,
"pressure"=>1022.88,
"visibility"=>6.21,
"ozone"=>319.4
}
我是 json 新手,但这不是常规的 json,对吗?我应该怎么做才能让我在脚本标签中看到这个?
谢谢。