Receive warning on iPhone: NSString may not respond to '-JSONValue'

In my iPhone application, I am accessing a web server to retrieve data.

Here I use JSON to retrieve data from a database.

I get a warning saying:

NSString may not respond to '-JSONValue'

How to solve it?

+7
source share
3 answers

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

+9
source

You tried to add the JSON Library to your project and import it

 #import "JSON/JSON.h" 
+2
source

You probably just skip the inclusion of JSON in your library.

+1
source

All Articles