且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何解析此Flickr响应?

更新时间:2023-02-23 17:21:20

使用

Use the NSJSONSerialization class to parse the JSON data.

jsonFlickrApi(...)表示您正在使用JSONP端点与Flickr对话.您不需要这个;一个普通的JSON端点就可以了.根据此Flickr API文档,您可以通过在值中包含参数nojsoncallback来解决此问题1当您提出请求时.

The jsonFlickrApi(...) indicates that you're using a JSONP endpoint to talk to Flickr. You don't need this; a plain JSON endpoint is fine. According to this Flickr API documentation you can fix this by including the parameter nojsoncallback with the value 1 when you make your request.