Created
April 21, 2014 16:03
-
-
Save Duraiamuthan/11147145 to your computer and use it in GitHub Desktop.
Objective c object to json string serialization
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:ObjcObject options:NSJSONWritingPrettyPrinted error:&writeError]; | |
NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment