Search code examples
iosnsdictionarynsdata

Error Store NSdata to NsDictonary


plz help me to parse JSON data. we get response in NSMutable Data. but we cn't take out data in Dictionary. my jsonDictionary get nil. this is my Url . i have check on JSON Validator.They show Valid Json output. help....

http://mobileapp.merucabs.com/NearByCab_ETA/GetNearByCabs.svc/rest/nearby?Lat=23.0768222&Lng=72.645732&SuggestedRadiusMeters=5000&CabMaxCount=10

-(void)connectionDidFinishLoading:(NSURLConnection *)connection {

   // NSString *responseString = [[NSString alloc] initWithData:receivedData encoding:NSUTF8StringEncoding];
    //NSLog(@"Response String is %@",responseString);
    [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;


jsonDictionary=[NSJSONSerialization JSONObjectWithData:receivedData options:NSJSONReadingMutableContainers error:nil];
jsonArr=[jsonDictionary objectForKey:@"results"];
  //  NSLog(@"JSONDictionary is %@",jsonDictionary);
[_categoryListTableView reloadData];


}

Solution

  • I got the output from your URL and I created the New project and Run , the project link is attach here