ios - Alamofire JSON 请求

标签 ios swift alamofire

如何将 GET 响应读取和解析为 JSON? 我可以阅读它,但我无法快速解析 JSON,实际上我不知道下面的 JSON 类型是什么:

Alamofire.request(.GET, "https://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=129caade072f51df051a20980f3cc86d&tags=landscape&per_page=1&page=1&format=json&nojsoncallback=1&api_sig=d02d3a7464d69a328e598e02dfc595af")
         .responseJSON { (_, _, JSON, _) in
                  println(JSON)

         }

最佳答案

您可以使用以下 JSON 反序列化库之一 https://github.com/matteocrippa/awesome-swift#json

关于ios - Alamofire JSON 请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29374650/

相关文章:

ios - 如何在容器 View 中显示 WKWebView 内容

arrays - Alamofire - 将字符串数组作为参数传递

swift - 如何在 Swift 2 中将 Array<String> 添加到 Dictionary<String, AnyObject>

swift - Alamofire 以哪种格式对图像进行编码?

ios - Parse.com - 如何为当前用户搜索/检索安全对象

ios - Swift 编译器错误 : "Expression too complex" on a string concatenation

ios - 从 uitextfield 获取值而不带可选

xcode - 无法将类型 '[RKDataStreamingMask]' 的值转换为预期的参数类型 'RKDataStreamingMask'

swift - 如何在 Swift 中从 UIPicker 填充文本字段

iphone - UITextView 在 iPhone 中滚动(自动)?