Search code examples
iphonecocoa-touchjsonios4ios-4.2

Getting warning in iPhone: NSString may not respond to '-JSONValue'


In my iPhone app, I am making an access to the webserver to fetch the data.

Here I am using JSON to retrieve the data from database.

I get a warning that says:

NSString may not respond to '-JSONValue'

How to resolve it?


Solution

  • Add this #import "JSON.h" at the top of your .m or .h file.