{"action":"closed","issue":{"url":"https://api.github.com/repos/stripe/stripe-java/issues/229","labels_url":"https://api.github.com/repos/stripe/stripe-java/issues/229/labels{/name}","comments_url":"https://api.github.com/repos/stripe/stripe-java/issues/229/comments","events_url":"https://api.github.com/repos/stripe/stripe-java/issues/229/events","html_url":"https://github.com/stripe/stripe-java/issues/229","id":111143204,"number":229,"title":"Lists are not serialized correctly","user":{"login":"olivierbellone","id":14116796,"avatar_url":"https://avatars.githubusercontent.com/u/14116796?v=3","gravatar_id":"","url":"https://api.github.com/users/olivierbellone","html_url":"https://github.com/olivierbellone","followers_url":"https://api.github.com/users/olivierbellone/followers","following_url":"https://api.github.com/users/olivierbellone/following{/other_user}","gists_url":"https://api.github.com/users/olivierbellone/gists{/gist_id}","starred_url":"https://api.github.com/users/olivierbellone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olivierbellone/subscriptions","organizations_url":"https://api.github.com/users/olivierbellone/orgs","repos_url":"https://api.github.com/users/olivierbellone/repos","events_url":"https://api.github.com/users/olivierbellone/events{/privacy}","received_events_url":"https://api.github.com/users/olivierbellone/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-10-13T09:34:27Z","updated_at":"2015-10-16T14:21:04Z","closed_at":"2015-10-16T14:21:04Z","body":"When [creating a product](https://stripe.com/docs/api/java#create_product) with the following code:\r\n\r\n```java\r\nMap<String, Object> productParams = new HashMap<String, Object>();\r\nproductParams.put(\"name\", \"T-shirt\");\r\nproductParams.put(\"description\", \"Comfortable gray cotton t-shirts\");\r\nList<String> attributes = Arrays.asList(\"size\", \"gender\");\r\nproductParams.put(\"attributes\", attributes);\r\nProduct product = Product.create(productParams);\r\n```\r\n\r\nthe request body will be encoded like this:\r\n```\r\n{\r\n  description: \"Comfortable gray cotton t-shirts\",\r\n  name: \"T-shirt\",\r\n  attributes:\r\n  {\r\n    0: \"size\",\r\n    1: \"gender\"\r\n  }\r\n}\r\n```\r\n\r\nBecause the `attributes` list is not correctly serialized, the product creation then fails with:\r\n```\r\nerror:\r\n{\r\n  type: \"invalid_request_error\",\r\n  message: \"Invalid array\",\r\n  param: \"attributes\"\r\n}\r\n```\r\n\r\n`attributes` should be serialized as:\r\n```\r\nattributes: [\r\n  \"size\",\r\n  \"gender\"\r\n]\r\n```"}}