1,读取本地 json
NSString *jsonPath = [[NSBundle mainBundle] pathForResource:@"home" ofType:@"json"];
NSData *data=[NSData dataWithContentsOfFile:jsonPath];
NSError *error;
id jsonObject=[NSJSONSerialization JSONObjectWithData:data
options:NSJSONReadingAllowFragments
error:&error];
2,把 son 转成 model
//HomePageMainModel写的 model
homePageMainModel = [[HomePageMainModel alloc] initWithDictionary:jsonObject error:nil];
NSLog(@"%@",homePageMainModel);