JSONRepresentation for NSMutableDictionary

我的梦境 提交于 2019-12-14 01:31:46

问题


I want to call the JSONRepresentation method on an NSMutableDictionary object. I'm calling it using [userDict JSONRepresentation];, but I am getting the following warning:

NSMutableDictionary may not responsd to '-JSONRepresentation'

Could anyone tell me how to I can properly call the JSONRepresentation method on an object of the NSMutableDictionary type?

Thanks in advance.


回答1:


The JSONRepresentation method comes from json-framework. Include that framework in your project and import the correct headers, and you should be good to go.



来源:https://stackoverflow.com/questions/7143863/jsonrepresentation-for-nsmutabledictionary

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