0

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

hanumanDev
  • 6,592
  • 11
  • 82
  • 146
  • 2
    You probably need to import the `NSString+SBJSON.h` file in the .m file containing the code you posted. – rmaddy Nov 13 '12 at 16:52

2 Answers2

7

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

#import "NSString+SBJSON.h"
IluTov
  • 6,807
  • 6
  • 41
  • 103
-1

Install the NSString+JSON category.

Hot Licks
  • 47,103
  • 17
  • 93
  • 151