json to string
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:json
options:NSJSONWritingPrettyPrinted
error:nil];
NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
string to json
NSData *stringData = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; id json = [NSJSONSerialization JSONObjectWithData:stringData options:0 error:nil];