title: Convert a JSON NSData to NSDictionary
body: <p>I'm using an API service of a web service and it is written in their description that they send JSON data which also matches in my opinion with the response I get from it.</p>
  <p>Here a part of it which I got from the NSURLConnection-Delegate (connection didReceiveData: (NSData *) data) and converted in a NSString using:</p>
  <pre><code>NSLog(@&quot;response: %@&quot;, [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]);
  </code></pre>
  <p>Here the snippet:</p>
  <pre><code>{&quot;scans&quot;: 
  {
      &quot;Engine1“: 
      {
          &quot;detected&quot;: false, 
          &quot;version&quot;: &quot;1.3.0.4959&quot;, 
          &quot;result&quot;: null, 
          &quot;update&quot;: &quot;20140521&quot;
      }, 
      &quot;Engine2“: 
      {
          &quot;detected&quot;: false,
           &quot;version&quot;: &quot;12.0.250.0&quot;,
           &quot;result&quot;: null,
           &quot;update&quot;: &quot;20140521&quot;
      }, 
          ...
      },
      &quot;Engine13&quot;: 
      {
           &quot;detected&quot;: false,
           &quot;version&quot;: &quot;9.178.12155&quot;,
           &quot;result&quot;: 
  </code></pre>
  <p>In the NSLog-String it stops there. Now I would like to know from you whats wrong that I can't convert this data to a JSON Dictionary with this lines of code:</p>
  <pre><code>NSError* error;
      NSMutableDictionary *dJSON = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:&amp;error];
  </code></pre>
  <p>I experiment with some options but always the same error:</p>
  <pre><code>Error Domain=NSCocoaErrorDomain Code=3840 &quot;The operation couldn’t be completed. (Cocoa error 3840.)&quot; 
  (Unexpected end of file while parsing object.) UserInfo=0x109260850 {NSDebugDescription=Unexpected end of file while parsing object.}
  </code></pre>
  <p>Everything indicates that the JSON packet is incomplete but I don't know how to check it or how to look for the issue which should be located in my code.</p>