阅读背景:

如何在本地阵列swift 3中保存Alamofire的response.result.value

来源:互联网 
Alamofire.request(NEWS_FEED_URL).responseJSON { response in

guard let newsResponse = response.result.value else{
        print("Error: \(response.result.error)")
        return
    }
    print("JSON: \(newsResponse)")
    let localArray:Array = [newsResponse]
    print("Local Array:", localArray)
}



I am using alamofire to fetch data from server and trying to write parser on the response data. When I fetch response.result.value from alamofire and print it is working fine. But as soon as I put response.result.value in my local array it gives  


[<__NSArrayI 0x6080000bcf80>(
{
    category = World; 
})]
Alamofire.request(NEWS_FEED_URL).responseJSON {



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: