直接向读取数组一样的 _AllARY = [NSArray arrayWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"Address" ofType:@"plist"]];
失败,则可以
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"city" ofType:@"json"];
NSLog(@"filePath: %@", filePath);
NSData *jsonData = [NSData dataWithContentsOfFile:filePath];
NSLog(@"jsonData: %@", jsonData);
NSError *error = nil;
NSDictionary *jsonDict = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingAllowFragments|NSJSONReadingMutableLeaves error:&error];
NSLog(@"jsonDict: %@", jsonDict);
NSLog(@"error: %@", error);