读取json文件
2015-12-30 本文已影响87人
fallrainy
读取json文件
NSString *path = [[NSBundle mainBundle] pathForResource:@"area" ofType:@"json"];
NSData *data = [NSData dataWithContentsOfFile:path];
NSError *error;
NSDictionary *jsonDict = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:&error];