문제

I have encountered this error:

No visible @interface for 'NSString' declares the selector 'JSONValue'.

The error occurs on:

NSDictionary * root = [responseString JSONValue]; NSArray *data = [root objectForKey:@"data"];

does anyone know how to fix it? Could I be missing a JSON file?

enter image description here

도움이 되었습니까?

해결책

Add this line to the top of your .m file, where you try to call it:

#import "NSString+SBJSON.h"

다른 팁

Install the NSString+JSON category.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top