AFNetworking/AFNetworking — pull request #1695 by andrey-krukovskiy (2013-12-16 09:47:10+00:00)
Title: Form url encoded array serialization fix.

I found issue, when parameters array include few dictionaries with the same structure, then it's serialization form is an array without indexes. And server side can not make difference between that data.

For example:
Array with two dictionaries:
[{
email: user+athlete@example.com,
role: "athlete"
},
{
email: user+family@example.com,
role: "family"
}]

Serialized:

space[invitations_attributes][][email]=user%2Bathlete%40example.com
&space[invitations_attributes][][role]=athlete
&space[invitations_attributes][][email]=user%2Bfamily%40example.com
&space[invitations_attributes][][role]=family

I think more correct serialization will next:

space[invitations_attributes][0][email]=user%2Bathlete%40example.com
&space[invitations_attributes][0][role]=athlete
&space[invitations_attributes][1][email]=user%2Bfamily%40example.com
&space[invitations_attributes][1][role]=family

The same in 1.3.x version.

What do you think?