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

不问归期 提交于 2019-12-19 06:23:35

问题


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?


回答1:


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




回答2:


Have you tried to add JSON Library to your project and import it

#import "JSON/JSON.h"



回答3:


You probably just miss the include to your JSON library



来源:https://stackoverflow.com/questions/4669061/getting-warning-in-iphone-nsstring-may-not-respond-to-jsonvalue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!