iOS 本地json数据解析

NSString *jsonPath = [[NSBundle mainBundle] pathForResource:@"data" ofType:@"json"];

NSData *data = [NSData dataWithContentsOfFile:jsonPath];

id result = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:nil];

NSLog(@"%@", result);

你可能感兴趣的:(iOS 本地json数据解析)