欲解析以下給出的所有在然後陣列中iPhone應用程序用來顯示JSON數據解析
http://www.krsconnect.no/community/api.html?method=fullEvents&appid=620 SBJsonParser *解析器= [[SBJsonParser的alloc] INIT]所述數據; NSURLRequest * request = [NSURLRequest requestWithURL:[NSURL URLWithString:@「http://www.krsconnect.no/community/api.html?method=fullEvents & appid = 620」]]; NSData * response = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil]; NSString * json_string = [[NSString alloc] initWithData:response encoding:NSUTF8StringEncoding]; NSDictionary * object = [parser objectWithString:json_string error:nil];
NSArray *results = [parser objectWithString:json_string error:nil];
NSDictionary *dictOne = [results objectAtIndex:0];
NSArray *activitiesArray = [dictOne objectForKey:@"activities"];
NSDictionary *dictTwo = [activitiesArray objectAtIndex:0];
NSDictionary *eventDict = [dictTwo objectForKey:@"event"];
NSDictionary *dictThree = [activitiesArray objectAtIndex:0];
NSDictionary *eventDict3 = [dictThree objectForKey:@"images"];
NSLog(@"%@ - %@", [eventDict3 objectForKey:@"large"]);
NSLog(@"%@ - %@", [eventDict objectForKey:@"category"]);
NSLog(@"%@ - %@", [eventDict objectForKey:@"content"]);
...問題是? – microspino
那該如何解析這個 – Ali
如何解析一下? – JeremyP