Reputation: 13952
How to use JSONKit to serialize a NSDictionary into string? I couldn't find any examples.
Upvotes: 7
Views: 6811
Reputation:
The "Serializing Interface" section of the JSONKit README states that the library adds a method JSONString
to NSArray
, NSDictionary
, and NSString
. This looks like what you're after.
NSDictionary *dictionary = [NSDictionary withObjectsAndKeys:...];
NSString *JSON = [dictionary JSONString];
Upvotes: 11