Created
April 29, 2015 14:38
-
-
Save aodhol/ea3614f68c34c4aa1b55 to your computer and use it in GitHub Desktop.
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
NSDictionary *rabbits = @{@"name": @"Bugs", @"color":@"#777"}; | |
NSError *error; | |
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:rabbits | |
options:NSJSONWritingPrettyPrinted | |
error:&error]; | |
NSLog(@"Pretty Printed JSON:%@", [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment