0
我有一个方法如下使用纠正的Json问题与调用功能
+(NSString *)CorrectJsonForEmptyValues:(NSString *)pasRawJson
{
NSLog(@"CorrectJsonForEmptyValues");
NSMutableString *tmpJson = [pasRawJson mutableCopy];
[tmpJson replaceOccurrencesOfString:@"[,"
withString:@"[{\"v\": \"N/A\",\"f\":\"N/A\"},"
options:0
range:NSMakeRange(0, [tmpJson length])];
[tmpJson replaceOccurrencesOfString:@",,"
withString:@",{\"v\": \"N/A\",\"f\":\"N/A\"},"
options:0
range:NSMakeRange(0, [tmpJson length])];
NSString *correctedJson=tmpJson;
return correctedJson;
}
空值,这样调用
result = [self performSelector:@selector(CorrectJsonforEmptyvalues:) withObject:result];
但是,让错误的函数
2011-11-11 11:11:33.217 HelloWorld10[38833:207] -[Data CorrectJsonforEmptyvalues:]: unrecognized selector sent to instance 0x5725cc0
2011-11-11 11:11:33.219 HelloWorld10[38833:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[Data CorrectJsonforEmptyvalues:]: unrecognized selector sent to instance 0x5725cc0'
如果任何人都可以请提供一个解决方案,这将是有益的。 在此先感谢。