Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Downloading and Parsing JSON Data
Hi guys i am referring to this video: http://teamtreehouse.com/library/build-a-blog-reader-iphone-app-2/getting-data-from-the-web/downloading-and-parsing-json-data-2
It is regarding the extra credit question. I am some how not able to get what are they asking to be displayed on the blog reader table view . I did every thing as i was taught and the app uptil now in the simulator works just fine. But the extra credit question i am not able to get what exactly they want us to do. Please help
Thanks Natacha S. for the prompt reply.
This is what i am doing in the - (void)viewDidLoad method. and I am still not able to get what am i doing wrong.
NSURL *blogURL=[NSURL URLWithString:@"https://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=JSON"]; NSData *jsonData=[NSData dataWithContentsOfURL:blogURL]; // NSLog(@"%@",jsonData); NSError *error=nil; NSDictionary *dataDictionary=[NSJSONSerialization JSONObjectWithData:jsonData options:0 error:&error]; NSLog(@"%@",dataDictionary); self.blogPosts=[dataDictionary objectForKey:@"results"];
The app is working fine in the simulator, i mean there are no errors. but no data is showing on the table view in simulator.
They want you to use a different set of data to import into your blog reader. For example they'd like to see the data returned by a random google search, that you determine by modifying what comes after the "q="
Thanks for replying back Amit. It works fine now.... Thanks once again