Parsing JSONP with AFNetworking/JSONKit

我只是一个虾纸丫 提交于 2019-12-11 10:32:17

问题


I need help parsing the below url:

I know how to do this if the format had been JSON, but its in the format JSONP.

http://sg.media-imdb.com/suggests/h/hello.json

Thank you in advance!


回答1:


JSONP is just JSON wrapped in a function call: callback(JSON_GOES_HERE). So just find outermost parentheses, then proceed to parse as JSON whatever is inside them.



来源:https://stackoverflow.com/questions/15017306/parsing-jsonp-with-afnetworking-jsonkit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!