JSONRepresentation for NSMutableDictionary
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.
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.
精彩评论