Turns out Flickr escapes single quotes (') and apparently this isn't allowed. The Json parser error message is not helpful for figuring this out.
By train and error I figured out doing a simple search to remove the backslashes before single quotes gets around the issue.
Here is the code I used to do so.
str = [str stringByReplacingOccurrencesOfString:@"\\'" withString:@"'"];
Oh yeah one more thing, here's the easy flickr url for getting images:
http://api.flickr.com/services/feeds/photos_public.gne?tags=san+francisco,bicycle,biking,golden+gate+bridge&tagmode=all&format=json



Interesting. Currently having similar Json parser struggle with Foresquare's new v2 API (12/10/10) at Startup Weekend Redmond.
ReplyDeleteWhen the dot method parsing Json does not work, how do you print out the Json request to see what is really happening?
-cliveb
Are you building this for the iPhone or in Javascript? I'm not aware of a dot method on the iPhone.
ReplyDelete