{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular.js/issues/12393","labels_url":"https://api.github.com/repos/angular/angular.js/issues/12393/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular.js/issues/12393/comments","events_url":"https://api.github.com/repos/angular/angular.js/issues/12393/events","html_url":"https://github.com/angular/angular.js/issues/12393","id":96263708,"number":12393,"title":"$httpParamSerializerJQLike doesn't encode array indices (as opposed to $.param)","user":{"login":"odedniv","id":894198,"avatar_url":"https://avatars.githubusercontent.com/u/894198?v=3","gravatar_id":"","url":"https://api.github.com/users/odedniv","html_url":"https://github.com/odedniv","followers_url":"https://api.github.com/users/odedniv/followers","following_url":"https://api.github.com/users/odedniv/following{/other_user}","gists_url":"https://api.github.com/users/odedniv/gists{/gist_id}","starred_url":"https://api.github.com/users/odedniv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odedniv/subscriptions","organizations_url":"https://api.github.com/users/odedniv/orgs","repos_url":"https://api.github.com/users/odedniv/repos","events_url":"https://api.github.com/users/odedniv/events{/privacy}","received_events_url":"https://api.github.com/users/odedniv/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular/angular.js/labels/component:%20$http","name":"component: $http","color":"d7e102"},{"url":"https://api.github.com/repos/angular/angular.js/labels/type:%20bug","name":"type: bug","color":"000000"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/angular/angular.js/milestones/80","html_url":"https://github.com/angular/angular.js/milestones/1.4.x","labels_url":"https://api.github.com/repos/angular/angular.js/milestones/80/labels","id":901585,"number":80,"title":"1.4.x","description":"","creator":{"login":"petebacondarwin","id":15655,"avatar_url":"https://avatars.githubusercontent.com/u/15655?v=3","gravatar_id":"","url":"https://api.github.com/users/petebacondarwin","html_url":"https://github.com/petebacondarwin","followers_url":"https://api.github.com/users/petebacondarwin/followers","following_url":"https://api.github.com/users/petebacondarwin/following{/other_user}","gists_url":"https://api.github.com/users/petebacondarwin/gists{/gist_id}","starred_url":"https://api.github.com/users/petebacondarwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petebacondarwin/subscriptions","organizations_url":"https://api.github.com/users/petebacondarwin/orgs","repos_url":"https://api.github.com/users/petebacondarwin/repos","events_url":"https://api.github.com/users/petebacondarwin/events{/privacy}","received_events_url":"https://api.github.com/users/petebacondarwin/received_events","type":"User","site_admin":false},"open_issues":65,"closed_issues":74,"state":"open","created_at":"2014-12-12T10:36:27Z","updated_at":"2015-07-21T15:53:37Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2015-07-21T08:55:44Z","updated_at":"2015-07-21T20:55:55Z","closed_at":null,"body":"Why does pressing Enter while in the title posts the issue?\r\n\r\nAnyway, found an important encoding difference between `$.param` and `$httpParamSerializerJQLike`.\r\nWhen encoding arrays, sometimes it's fine to leave the index out like that: `a[]=1&a[]=2`, which comes out as `a = [1, 2]` on the other side.\r\n\r\nSometimes this is not the case, mostly when you have array of objects: `a[][x]=1&a[][y]=2`, which comes out as `a = [{ x: 1, y: 2 }]`, which is sometimes true, but what if you meant `a = [{ x: 1 }, { y: 2 }]`? In this case you need to encode the array index like so: `a[0][x]=1&a[1][y]=2`. JQuery does that with `$.param`, and Rails for example knows how to handle it.\r\n\r\nIf indices are not given, the server only appends a new object to the array when there are duplicate keys, like so: `a[][x]=1&a[][y]=2&a[][x]=3`, which should come out as `a = [{ x: 1, y: 2 }, { x: 3 }]`."},"comment":{"url":"https://api.github.com/repos/angular/angular.js/issues/comments/123474833","html_url":"https://github.com/angular/angular.js/issues/12393#issuecomment-123474833","issue_url":"https://api.github.com/repos/angular/angular.js/issues/12393","id":123474833,"user":{"login":"lgalfaso","id":391394,"avatar_url":"https://avatars.githubusercontent.com/u/391394?v=3","gravatar_id":"","url":"https://api.github.com/users/lgalfaso","html_url":"https://github.com/lgalfaso","followers_url":"https://api.github.com/users/lgalfaso/followers","following_url":"https://api.github.com/users/lgalfaso/following{/other_user}","gists_url":"https://api.github.com/users/lgalfaso/gists{/gist_id}","starred_url":"https://api.github.com/users/lgalfaso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lgalfaso/subscriptions","organizations_url":"https://api.github.com/users/lgalfaso/orgs","repos_url":"https://api.github.com/users/lgalfaso/repos","events_url":"https://api.github.com/users/lgalfaso/events{/privacy}","received_events_url":"https://api.github.com/users/lgalfaso/received_events","type":"User","site_admin":false},"created_at":"2015-07-21T20:55:55Z","updated_at":"2015-07-21T20:55:55Z","body":"#12398 should take care of this"}}