title: AFNetworking multipart/form-data POST sends incorrect JSON array of dictionaries
body: <p>I don't know if this is a bug or I'm just not doing it right.</p>
  
  <p>This post looked so close to solving it for me but didn't: <a href="https://stackoverflow.com/questions/21344580/afnetworking-posts-json-arrays-as-multiple-single-entry-dictionaries">AFNetworking posts JSON arrays as multiple single-entry dictionaries</a></p>
  
  <p>I'm trying to send a multipart/form-data POST with an image and passing a dictionary (which contains an array of dictionaries) to 'parameters' to be sent as JSON.</p>
  
  <p>The dictionary:</p>
  
  <pre><code>NSDictionary *parameters = @{@"photos" : @[@{@"photoID":@"0", @"imageURL":@"0", @"imageName":@"0"},
                                             @{@"photoID":@"1", @"imageURL":@"1", @"imageName":@"1"},
                                             @{@"photoID":@"2", @"imageURL":@"2", @"imageName":@"2"}]};
  </code></pre>
  
  <p>The request:</p>
  
  <pre><code>AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
  manager.requestSerializer = [AFJSONRequestSerializer serializer];
  
  
  [manager POST:@"myURL" parameters:parameters constructingBodyWithBlock:^(id&lt;AFMultipartFormData&gt; formData) {
          [formData appendPartWithFileData:imageData name:@"image" fileName:@"image" mimeType:@"image/png"];
  
      } success:^(AFHTTPRequestOperation *operation, id responseObject) {
          NSLog(@"Success: %@", responseObject);
  
      } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
          NSLog(@"Error: %@", error);
      }];
  </code></pre>
  
  <p>The image is being sent and received fine, however the JSON received on the server looks like this:</p>
  
  <pre><code>{
      photos =     (
                  {
              imageName = 0;
          },
                  {
              imageURL = 0;
          },
                  {
              photoID = 0;
          },
                  {
              imageName = 1;
          },
                  {
              imageURL = 1;
          },
                  {
              photoID = 1;
          },
                  {
              imageName = 2;
          },
                  {
              imageURL = 2;
          },
                  {
              photoID = 2;
          }
      );
  }
  </code></pre>
  
  <p>...an array of multiple single-entry dictionaries :(</p>
  
  <p>Instead of:</p>
  
  <pre><code>{
      photos =     (
                  {
              imageName = 0;
              imageURL = 0;
              photoID = 0;
          },
                  {
              imageName = 1;
              imageURL = 1;
              photoID = 1;
          },
                  {
              imageName = 2;
              imageURL = 2;
              photoID = 2;
          }
      );
  }
  </code></pre>
  
  <p>Any help would be great, thanks!</p>