NSMutableDictionary的JSONRepresentation [英] JSONRepresentation for NSMutableDictionary
问题描述
我想在NSMutableDictionary
对象上调用JSONRepresentation
方法.我使用[userDict JSONRepresentation];
调用它,但收到以下警告:
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'
有人可以告诉我如何正确调用NSMutableDictionary
类型的对象上的JSONRepresentation
方法吗?
Could anyone tell me how to I can properly call the JSONRepresentation
method on an object of the NSMutableDictionary
type?
谢谢.
推荐答案
JSONRepresentation
方法来自 json-framework .在您的项目中包括该框架并导入正确的标头,您应该一切顺利.
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.
这篇关于NSMutableDictionary的JSONRepresentation的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!