我通过AFNetworking从iTunes API获取数据,我想创建一个带有响应的字典,但我做不到.
错误:无法将表达式的类型"Dictionary"转换为类型"Hashable"
这是我的代码:
func getItunesStore() {
self.manager.GET( "https://itunes.apple.com/es/rss/topfreeapplications/limit=10/json",
parameters: nil,
success: { (operation: AFHTTPRequestOperation!,responseObject: AnyObject!) in
var jsonResult: Dictionary = responseObject as Dictionary
},
failure: { (operation: AFHTTPRequestOperation!,error: NSError!) in
println("Error:" + error.localizedDescription)
})
}