I have a JSON file which I am trying to parse as seen below
-(void)loadSuraNames
{
NSURL * url = [NSURL URLWithString:@"http://www.submission.ws/downloads/json/"];
url = [url URLByAppendingPathComponent:@"quran_main.json"];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
NSData *response = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];
NSError *jsonParsingError = nil;
NSArray *array = [NSJSONSerialization JSONObjectWithData:response options:0 error:&jsonParsingError];
NSLog(@"my Json is empty :( %@", array);
}
But I am not getting any data back. Any one has any ideas what the problem is?
I am getting the following error:
Error Domain=NSCocoaErrorDomain Code=3840 "The operation couldn’t be completed. (Cocoa error 3840.)" (Invalid escape sequence around character 278.) UserInfo=0xa47ff60 {NSDebugDescription=Invalid escape sequence around character 278.}