由于解析的结果如
{"result":[{"id":1,"title":"需要澳洲鲍鱼四只","content":null,"createTime":"","memId":0,"orgId":1,"corpName":"红星美凯龙南京中央路商场","corpLogo":null,"memName":null,"memJob":null,"memTel":null,"memEmail":null,"images":null}
中id为1,而且不是字符串类型,那么就造成了我们在存的时候值不对,那么我们可以用两种方法来保存这样的参数
int myid = [((NSNumber*)[d objectForKey:@"id"]) intValue];
int myid2 = [[d objectForKey:@"id"] intValue];
以上是将参数转换
然后赋值
project.strProID = [NSString stringWithFormat:@"%d",myid2];