title: NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set - iOS
body: <p>I tried to use this to upload user information + image to data base : </p>
  
  <pre><code>- (void)Inscription_withImage:(NSArray *)value :(NSData *)data completion:(void (^)( NSString * retour))block{
  
  
      AFHTTPRequestOperationManager *mgr = [AFHTTPRequestOperationManager manager];
  
      NSMutableDictionary *params = [NSMutableDictionary dictionary];
      params[@"data[User][username]"] = @"Jack";
      params[@"data[User][password]"] = @"Jack";
      params[@"data[User][email]"] = @"Jack";
      params[@"data[User][first_name]"] = @"Jack";
      params[@"data[User][last_name]"] = @"Jack";
      mgr.responseSerializer.acceptableContentTypes = [NSSet setWithObject:@"text/html"];
      [mgr POST:@"http://  /Messenger/services/messenger_register" parameters:params
  constructingBodyWithBlock:^(id&lt;AFMultipartFormData&gt; formData) {
  
  
      [formData appendPartWithFileData:data name:@"data[User][image]" fileName:@"image.jpg" mimeType:@"image/jpg"];
       }
        success:^(AFHTTPRequestOperation *operation, id responseObject) {
            NSLog(@"upload success!----%@", responseObject);
        } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
            NSLog(@"upload failed!----%@", error);
        }];
  
  
    }
  </code></pre>
  
  <p>when i added this :   </p>
  
  <pre><code>[formData appendPartWithFileData:data name:@"data[User][image]" fileName:@"image.jpg" mimeType:@"image/jpg"];
  </code></pre>
  
  <p>i found this problem:</p>
  
  <p>upload failed!----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=0x176d25c0 {NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set.}</p>
  
  <p>Please i need your help </p>