Oksana
Oksana

Reputation: 13952

JSONKIt serialize NSDIctionary

How to use JSONKit to serialize a NSDictionary into string? I couldn't find any examples.

Upvotes: 7

Views: 6811

Answers (1)

user94896
user94896

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

Related Questions