我正在尝试使用 JSON 来解析我从 ASIHttpRequest 获得的刺痛,但我发现链接器错误,例如
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_SBJsonParser", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation
下面是我正在使用的代码。有关更多详细信息,我已经在项目中添加了 Json 类。
(void)requestFinished:(ASIHTTPRequest *)request{
// Use when fetching text data
NSString *responseString = [request responseString];
SBJsonParser *parser=[[SBJsonParser alloc]init ];
NSDictionary *obj=[parser objectWithString:responseString error:NULL];
NSArray *list=[obj objectForKey:@"lessons"];
// Use when fetching binary data
// NSData *responseData = [request responseData];
}