I have a webserver which accepts dates in dd/MM/yyyy
format. I construct the string representation of NSDate
like this :
NSDateFormatter *dateFormatter = [NSDateFormatter new];
dateFormatter.dateFormat = @"dd/MM/yyy";
NSString *dateString = [dateFormatter stringFromDate:[NSDate new]];
The string is fine. However, after the whole server input gets processd through [NSJSONSerialization dataWithJSONObject: options: error:]
the /
gets escaped and the result looks like this : 10\/01\/2015
I do realize that the easiest way is to allow the server to accept other date delimiter (i.e. -
or .
) but I'm interested whether there is a way to make NSJSONSerialization
NOT escape characters.