title: NSJSONSerialization with an integer
body: <p>I'm writing an iOS application that gets data from a web request.  The request returns the following:
  <code>{"hash":"0369a5d5e65335309b2b1502dc96b5aba691b9451c83b9","error":0}</code></p>
  
  <p>I get the data from the <code>NSData* responseData</code> object as follows:</p>
  
  <pre><code>NSDictionary* JSONdata = [NSJSONSerialization JSONObjectWithData:_responseData options:0 error:&amp;error];
  
  NSInteger responseError = (NSInteger)[JSONdata objectForKey:@"error"];
  </code></pre>
  
  <p>However, <code>responseError</code> is coming back uninitialized (filled with garbage values).  I tried changing <code>NSInteger</code> to <code>NSString*</code> but that yields the following error</p>
  
  <pre><code>'NSInvalidArgumentException', reason: '-[__NSCFNumber length]: unrecognized selector sent to instance 0x9d02220'
  </code></pre>
  
  <p>Any ideas? </p>