问题
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