标签:http io ar sp for 数据 on bs html
var url = NSURL(string: "http://www.weather.com.cn/data/sk/101120501.html")
var data = NSData(contentsOfURL: url!, options: NSDataReadingOptions.DataReadingUncached, error: nil)
var json : AnyObject! = NSJSONSerialization.JSONObjectWithData(data!, options: NSJSONReadingOptions(), error: nil)
var weatherinfo: AnyObject? = json.objectForKey("weatherinfo")
var city: AnyObject? = weatherinfo?.objectForKey("city")
// println(city)
标签:http io ar sp for 数据 on bs html
原文地址:http://www.cnblogs.com/already/p/4108323.html