title: NSJSONSerialization misbehaves, 98% of the time returns array, other 2% returns dict
body: <p>This is really very odd.</p>
  
  <p>We're accessing a json Twitter API that always returns an array.
  ie
  <a href="https://twitter.com/statuses/user_timeline/485963081.json" rel="nofollow">https://twitter.com/statuses/user_timeline/485963081.json</a></p>
  
  <p>We do:</p>
  
  <pre><code>if([NSJSONSerialization class]) {
          NSError *error = nil;
          jsonResponse = [NSJSONSerialization JSONObjectWithData:responseData options:0 error:&amp;error];    
          DLog(@"JSON Parsing Error: %@", error);
  
      } else {
          NSString * jsonString = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding];
          jsonResponse = [jsonString JSONValue];
      }
      if([jsonResponse count] &gt; 0) {
          NSString *jsonText = [[jsonResponse objectAtIndex:0] objectForKey:@"text"];
          twitterText = jsonText;
      }
  </code></pre>
  
  <p>This works a vast majority of the time. The rest, we get this:</p>
  
  <pre><code>[__NSCFDictionary objectAtIndex:]: unrecognized selector sent to instance
  </code></pre>
  
  <p>Note, all the errors are on iOS5, so the SBJSON library does not apply.</p>
  
  <p>Sometimes NSJSONSerialization parses the array as a dict. Which frankly, is not possible using the data from twitter. So what's happening here?</p>