following code is copied from Stig Brautaset JSON library - I removed the comments to be more clear.
@interface NSString (NSString_SBJSON)
- (id)JSONFragmentValue;
- (id)JSONValue;
@end
I have a crash when I call:
NSString *jsonString = [request responseString];
...
NSDictionary *results = [jsonString JSONValue];//here is the crash with invalid selector.
I added this:
if (![jsonString respondsToSelector:@selector(JSONValue)])
{
NSLog(@"fix this!!!\n");
}
and the message is shown. Do you have any idea why this function in not called?
Thanks!
EDIT: I compile JSON framework as a static lib. The call is made in the same lib. When I compile it as exe it runs without any problem.