1

I have missing newline \n in a string after receiving it from iOS app through JSON post restful API. I have a string with a newline in iOS "the weather is \n fine" but after calling API i am receiving it without \n on the (vb.net). I want to see the newline character \n so i can split it in 2 phrases.

Code:

self.dataRequest = [ASIHTTPRequest requestWithURL:url];
[self.dataRequest setDefaultResponseEncoding:NSUTF8StringEncoding];
[self.dataRequest setResponseEncoding:NSUTF8StringEncoding];
[self.dataRequest setPostBody:(NSMutableData *)[jsonString dataUsingEncoding:NSUTF8StringEncoding]];
[self.dataRequest setRequestMethod:@"POST"];
[self.dataRequest setValidatesSecureCertificate:NO];
[self.dataRequest addRequestHeader:@"Accept" value:@"application/json"];
[self.dataRequest addRequestHeader:@"Content-Type" value:@"application/json"];
Flexicoder
  • 8,251
  • 4
  • 42
  • 56
Ziad Bou Ismail
  • 187
  • 2
  • 11

0 Answers0