iOS json解析失精度

  Podfile 添加 
  # JSONModel
  pod 'JSONModel'
    NSError *error;
    // 获取文件路径
    NSString *filePath = [[NSBundle mainBundle] pathForResource:@"saleFinish" ofType:@"json"];
    // 根据文件路径读取数据
    NSData *jdata = [[NSData alloc] initWithContentsOfFile:filePath];
    //data转模型
    YHExchangeSeckillResponse *jsonModel = [[YHExchangeSeckillResponse alloc] initWithData:jdata error:nil];

你可能感兴趣的:(iOS json解析失精度)