Simple JSON Parsing using GET Method.
NSString *requestStr = [NSString stringWithFormat:@"https://itunes.apple.com/in/rss/toppaidapplications/limit=100/json"]; NSURL *myURL = [[NSURL alloc]initWithString:requestStr]; NSData *myData = [[NSData alloc]initWithContentsOfURL:myURL]; id myJSON = [NSJSONSerialization JSONObjectWithData:myData options:NSJSONReadingMutableContainers error:nil]; jsonResponseDict = (NSMutableDictionary *)myJSON; NSMutableDictionary *dict = [jsonResponseDict valueForKey:@"feed"]; NSLog(@"Dict %@", dict);
No comments:
Post a Comment