我需要解析 Apple JSON,但我有一个小问题。我现在正在这样做:
问题在这里:
- (void)fetchedData:(NSData *)responseData {
NSError* error;
NSDictionary* json = [NSJSONSerialization JSONObjectWithData:responseData
options:kNilOptions
error:&error];
NSNumber *resultCount = [json objectForKey:@"resultCount"];
NSLog(@"%i", [resultCount intValue]);
NSArray * AppStoreUrlParse = [json objectForKey:@"results"];
NSDictionary* StoreParse = [AppStoreUrlParse objectAtIndex:0];
NSLog(@"%@", [json objectForKey:@"price"]);
}
在这条线上:
NSLog(@"%i", [resultCount intValue]);
NSlog 正在恢复: 1 像 JSON ( http://itunes.apple.com/lookup?id=387633954 )
但是在这条线上
NSLog(@"%@", [json objectForKey:@"price"]);
NSLOG 返回(空)
有谁知道我如何从 json 中获取价格?