开发者

IPhone xcode JSON feed problem

开发者 https://www.devze.com 2023-01-18 10:28 出处:网络
I\'m using the JSON framework off Google to build a local news IPhone app. It works for every JSON feed apart from one.

I'm using the JSON framework off Google to build a local news IPhone app. It works for every JSON feed apart from one.

I have no idea why?

It just won't return any information from the stringWithUrl function. I've checked the data is to standard and it appears to well with my va开发者_运维知识库lidator.

Anyone got any ideas?


First recommendation would be to switch to the asynchronous NSURLConnection, so that you can actually see what's going on with the request. The synchronous methods will under- and mis-report errors, and are generally a much worse approach to getting data from the network (among other things, they either block the UI, or force you to implement your own asynchrony).


The site is issuing a 301 redirect before serving up the data. Perhaps the stringWithURL method isn't following the redirect.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号