tags:

views:

34

answers:

2

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 validator.

Anyone got any ideas?

A: 

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

Robot K
+1  A: 

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).

Sixten Otto