1
我想用JSON來解析我從ASIHttpRequest得到的但我找到鏈接器錯誤使用Json解析字符串時的鏈接器錯誤
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
下面是我using.For我已經在項目中加入的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];
}
dasblinkenlight當然是正確的。 :)但這似乎是我喜歡它將是切換到NSJSONSerialization的好時機! [補丁ASI或更好的:離開它!] –