Podfile 添加
# JSONModel
pod 'JSONModel'
NSError *error;
// 獲取文件路徑
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"saleFinish" ofType:@"json"];
// 根據(jù)文件路徑讀取數(shù)據(jù)
NSData *jdata = [[NSData alloc] initWithContentsOfFile:filePath];
//data轉(zhuǎn)模型
YHExchangeSeckillResponse *jsonModel = [[YHExchangeSeckillResponse alloc] initWithData:jdata error:nil];