Q:

how to format backslash in JSON - iOS

I am using RestKit to call a service , which is a .NET web service, the date formate required as one of the parameter is "\/date(3467348+0000)\/" so I am formatting date in the required format and sending , issue is when i check log the HTTP request shows the date as "\\\/date(3467348+0000)\\\/" , I am not sure if RestKit adding these additional backslashes , question is how to avoid it.
Date is formatted as follows 
NSString *strDate = [NSString stringWithFormat:@"\\/Date(%@+%2.1f)\\/",strSeconds,timeZoneOffset];

and the request shows date as 
 PickupDateTime":"\\\/Date(1422880979912+5.5)\\\/"

Any solution ?

A:

There is no reason to escape slashes in the string, the format should be "/date(3467348+0000)/".
The backslashes is in the format string. I think that you can just remove them:
NSString *strDate = [NSString stringWithFormat:@"/Date(%@+%2.1f)/",strSeconds,timeZoneOffset];

