本地json文件解析

NSString *path = [[NSBundle mainBundle] pathForResource:@”city1″ ofType:@”json”];
  NSData *data = [NSData dataWithContentsOfFile:path];
  NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil];
 NSLog(@”%@”,dict);
分享到: 更多
Separator image Posted in IOS.