title: Error Domain = NSCocoaErrorDomain Code=3840 "The operation couldn’t be completed. (Cocoa error 3840.)
body: <p>I am requesting dynamic json string from web url. </p>
  
  <pre><code>-(void)getDataFromServer{
  
   NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@"http://www.domain.com/json/"]];
  
  [request setHTTPMethod:@"GET"];
  [request addValue:@"getValues" forHTTPHeaderField:@"METHOD"]; 
  
  NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self];
  }
  
  
  
  -(void)requestReturnedData:(NSData *)data{ //activated when data is returned
  
   NSDictionary *dictionary = [NSDictionary dictionaryWithJSONData:data];
  
  }
  </code></pre>
  
  <p>I got below error. </p>
  
  <pre><code>Error Domain=NSCocoaErrorDomain Code=3840 "The operation couldn’t be completed. (Cocoa  error 3840.)(JSON text did not start with array or object and option to allow fragments not set.) UserInfo=0x977a900 {NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set.}
  </code></pre>
  
  <p>I have tested with json text file  </p>
  
  <pre><code>NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@"http://www.domain.com/jsonfile.json"]];
  </code></pre>
  
  <p>It works perfectly. How can i overcome this issue.</p>
  
  <p>Edit---</p>
  
  <p>I have found that , if number of rows in json exeeding 200 this error happens. Otherwise it runs perfectly. is there a issue with data size.</p>