title: Parse JSON with iOS 6 and xCode 4.5.2
body: <p>I'm new in objective-c and and building a sign in page for a specific website. When the user provide information the following JSON return back from the server:</p>
  
  <pre><code>  {
     "object":{},
     "resultCode":0,
     "resultMessage":"You successfully signed in "
   }
  </code></pre>
  
  <p>And this what I'm trying to do based on a tutorial I found:</p>
  
  <pre><code>-(IBAction)login{
          // Download JSON
  
      NSData *data = [NSData dataWithContentsOfURL: [NSURL URLWithString:[NSString stringWithFormat:@"https://www.example.com/login?username=%@&amp;password=%@", nationalID.text,passowrd.text]]];
          NSError *error;
          NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:&amp;error];
  
          NSArray *response = [json objectForKey:@"resultMessage"];
          NSLog(@"response %@",response); 
  }
  </code></pre>
  
  <p>I want to log out "resultMessage" but somehow it throws an exception:</p>
  
  <pre><code>    2012-12-13 06:46:50.607 myProject[7178:11303] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'data parameter is nil'
  *** First throw call stack:
  (0x1c8d012 0x10cae7e 0x1c8cdeb 0xbff817 0x2f1a 0x10de705 0x15920 0x158b8 0xd6671 0xd6bcf 0xd5d38 0x4533f 0x45552 0x233aa 0x14cf8 0x1be8df9 0x1be8ad0 0x1c02bf5 0x1c02962 0x1c33bb6 0x1c32f44 0x1c32e1b 0x1be77e3 0x1be7668 0x1265c 0x279d 0x26c5)
  libc++abi.dylib: terminate called throwing an exception
  </code></pre>