{"action":"created","issue":{"url":"https://api.github.com/repos/stripe/stripe-ruby/issues/454","repository_url":"https://api.github.com/repos/stripe/stripe-ruby","labels_url":"https://api.github.com/repos/stripe/stripe-ruby/issues/454/labels{/name}","comments_url":"https://api.github.com/repos/stripe/stripe-ruby/issues/454/comments","events_url":"https://api.github.com/repos/stripe/stripe-ruby/issues/454/events","html_url":"https://github.com/stripe/stripe-ruby/pull/454","id":173276722,"number":454,"title":"Produce an error on bad array of maps","user":{"login":"brandur","id":96890,"avatar_url":"https://avatars.githubusercontent.com/u/96890?v=3","gravatar_id":"","url":"https://api.github.com/users/brandur","html_url":"https://github.com/brandur","followers_url":"https://api.github.com/users/brandur/followers","following_url":"https://api.github.com/users/brandur/following{/other_user}","gists_url":"https://api.github.com/users/brandur/gists{/gist_id}","starred_url":"https://api.github.com/users/brandur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brandur/subscriptions","organizations_url":"https://api.github.com/users/brandur/orgs","repos_url":"https://api.github.com/users/brandur/repos","events_url":"https://api.github.com/users/brandur/events{/privacy}","received_events_url":"https://api.github.com/users/brandur/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"brandur","id":96890,"avatar_url":"https://avatars.githubusercontent.com/u/96890?v=3","gravatar_id":"","url":"https://api.github.com/users/brandur","html_url":"https://github.com/brandur","followers_url":"https://api.github.com/users/brandur/followers","following_url":"https://api.github.com/users/brandur/following{/other_user}","gists_url":"https://api.github.com/users/brandur/gists{/gist_id}","starred_url":"https://api.github.com/users/brandur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brandur/subscriptions","organizations_url":"https://api.github.com/users/brandur/orgs","repos_url":"https://api.github.com/users/brandur/repos","events_url":"https://api.github.com/users/brandur/events{/privacy}","received_events_url":"https://api.github.com/users/brandur/received_events","type":"User","site_admin":false},"assignees":[{"login":"brandur","id":96890,"avatar_url":"https://avatars.githubusercontent.com/u/96890?v=3","gravatar_id":"","url":"https://api.github.com/users/brandur","html_url":"https://github.com/brandur","followers_url":"https://api.github.com/users/brandur/followers","following_url":"https://api.github.com/users/brandur/following{/other_user}","gists_url":"https://api.github.com/users/brandur/gists{/gist_id}","starred_url":"https://api.github.com/users/brandur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brandur/subscriptions","organizations_url":"https://api.github.com/users/brandur/orgs","repos_url":"https://api.github.com/users/brandur/repos","events_url":"https://api.github.com/users/brandur/events{/privacy}","received_events_url":"https://api.github.com/users/brandur/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2016-08-25T18:30:14Z","updated_at":"2016-08-26T17:21:26Z","closed_at":"2016-08-26T17:17:23Z","pull_request":{"url":"https://api.github.com/repos/stripe/stripe-ruby/pulls/454","html_url":"https://github.com/stripe/stripe-ruby/pull/454","diff_url":"https://github.com/stripe/stripe-ruby/pull/454.diff","patch_url":"https://github.com/stripe/stripe-ruby/pull/454.patch"},"body":"This produces an error when we detect an \"array of maps\" that cannot be\nencoded with `application/x-www-form-urlencoded`; that is to say, one\nthat does not have each hash starting with a consistent key that will\nallow a Rack-compliant server to recognize boundaries.\n\nSo for example, this is fine:\n\n```\nitems: [\n    { :type => 'sku', :parent => 'sku_94ZYSC0wppRTbk' },\n    { :type => 'discount', :amount => -10000, :currency => 'cad', :description => 'potato' }\n],\n```\n\nBut this is _not_ okay:\n\n```\nitems: [\n    { :type => 'sku', :parent => 'sku_94ZYSC0wppRTbk' },\n    { :amount => -10000, :currency => 'cad', :description => 'potato', :type => 'discount' }\n],\n```\n\n(`type` should be moved to the beginning of the array.)\n\nThe purpose of this change is to give users better feedback when they\nrun into an encoding problem like this one. Currently, they just get\nsomething confusing from the server, and someone on support usually\nneeds to examine a request log to figure out what happened.\n\nCI will fail until the changes in #453 are brought in.\n\nr? @dpetrovics Mind taking a shot at this one? Thanks!"},"comment":{"url":"https://api.github.com/repos/stripe/stripe-ruby/issues/comments/242796685","html_url":"https://github.com/stripe/stripe-ruby/pull/454#issuecomment-242796685","issue_url":"https://api.github.com/repos/stripe/stripe-ruby/issues/454","id":242796685,"user":{"login":"brandur","id":96890,"avatar_url":"https://avatars.githubusercontent.com/u/96890?v=3","gravatar_id":"","url":"https://api.github.com/users/brandur","html_url":"https://github.com/brandur","followers_url":"https://api.github.com/users/brandur/followers","following_url":"https://api.github.com/users/brandur/following{/other_user}","gists_url":"https://api.github.com/users/brandur/gists{/gist_id}","starred_url":"https://api.github.com/users/brandur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brandur/subscriptions","organizations_url":"https://api.github.com/users/brandur/orgs","repos_url":"https://api.github.com/users/brandur/repos","events_url":"https://api.github.com/users/brandur/events{/privacy}","received_events_url":"https://api.github.com/users/brandur/received_events","type":"User","site_admin":false},"created_at":"2016-08-26T17:21:26Z","updated_at":"2016-08-26T17:21:26Z","body":"Released as 1.51.0."}}
{"actor":{"display_login":"brandur"}}