title: json is not parsing correctly in objective-c
body: <p>I'm trying to parse my JSON into an NSDictionary. Here is the method that I use for parsing.</p>
  
  <pre><code>+ (NSDictionary *)executeGenkFetch:(NSString *)query
  {
      query = [NSString stringWithFormat:@"%@", query];
      query = [query stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
       NSLog(@"[%@ %@] sent %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd), query);
      NSData *jsonData = [[NSString stringWithContentsOfURL:[NSURL URLWithString:query] encoding:NSUTF8StringEncoding error:nil] dataUsingEncoding:NSUTF8StringEncoding];
      NSError *error = nil;
      NSDictionary *results = jsonData ? [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers|NSJSONReadingMutableLeaves error:&amp;error] : nil;
      if (error) NSLog(@"[%@ %@] JSON error: %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd), error.localizedDescription);
       NSLog(@"[%@ %@] received %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd), results);
      return results;
  }
  </code></pre>
  
  <p>And here is how I use this function.</p>
  
  <pre><code>+(NSArray *)getCommentsWithParam:(NSString *)Param
  {
      NSString *request = [NSString stringWithFormat:@"https://graph.facebook.com/comments/?ids=%@",Param];
      NSLog(@"request is %@",request);
      NSString *vfk = [NSString stringWithFormat:@"%@.comments.data",Param];
      return [[self executeGenkFetch:request] valueForKey:vfk];
  }
  </code></pre>
  
  <p>The problem is when I log the NSArray that I get back from getCommentsWithParam, I always get NULL. But when I look at the log from </p>
  
  <pre><code> NSLog(@"[%@ %@] received %@", NSStringFromClass([self class]), NSStringFromSelector(_cmd), results);
  </code></pre>
  
  <p>I get the JSON I want. Any help on what is going wrong?</p>