在我的应用程序中,Web服务是在dot net中创建的,我正在使用这些服务并获得响应。所有字段(如company,type,location)都是字符串,并且没有任何问题..还有一个叫做Exhibit number的字段,实际上它是一个整数,但它们只是作为字符串创建的。虽然我显示的是它显示的是零而不是那个数字..这是我的代码...JSON解析的Web服务
//Storing into Array
[SurveyFilesArray addObject:[NSDictionary dictionaryWithObjectsAndKeys:[dic objectForKey:@"FileName"],@"FileName",[dic objectForKey:@"ExibhitNumber"],@"ExhibitNumber",[dic objectForKey:@"Description"],@"Description",[dic objectForKey:@"FileQuality"],@"FileQuality",nil]];
//Retrieving from Array..
NSLog(@"???%@???",[NSString stringWithFormat:@"%d",[[[SurveyFilesArray objectAtIndex:indexPath.row]objectForKey:@"ExibhitNumber"]intValue]]);
NSLog(@"%d",[[[SurveyFilesArray objectAtIndex:indexPath.row]objectForKey:@"ExibhitNumber"]intValue]);
那么,什么是JSON?显示一些(**不是全部!**)。 – 2012-10-25 10:30:37
这是数据样本....管理 Description> 1 ExibhitNumber> housekeeping3.jpg Low FileQuality> - –
Sandeep
这是XML,而不是JSON。 – 2012-10-25 10:55:43