{"action":"created","issue":{"url":"https://api.github.com/repos/django-tastypie/django-tastypie/issues/1354","labels_url":"https://api.github.com/repos/django-tastypie/django-tastypie/issues/1354/labels{/name}","comments_url":"https://api.github.com/repos/django-tastypie/django-tastypie/issues/1354/comments","events_url":"https://api.github.com/repos/django-tastypie/django-tastypie/issues/1354/events","html_url":"https://github.com/django-tastypie/django-tastypie/issues/1354","id":108410077,"number":1354,"title":"Resource.deserialize() ignores format parameter","user":{"login":"HageMaster3108","id":6841412,"avatar_url":"https://avatars.githubusercontent.com/u/6841412?v=3","gravatar_id":"","url":"https://api.github.com/users/HageMaster3108","html_url":"https://github.com/HageMaster3108","followers_url":"https://api.github.com/users/HageMaster3108/followers","following_url":"https://api.github.com/users/HageMaster3108/following{/other_user}","gists_url":"https://api.github.com/users/HageMaster3108/gists{/gist_id}","starred_url":"https://api.github.com/users/HageMaster3108/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HageMaster3108/subscriptions","organizations_url":"https://api.github.com/users/HageMaster3108/orgs","repos_url":"https://api.github.com/users/HageMaster3108/repos","events_url":"https://api.github.com/users/HageMaster3108/events{/privacy}","received_events_url":"https://api.github.com/users/HageMaster3108/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/django-tastypie/django-tastypie/labels/bug","name":"bug","color":"d12727"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-25T21:21:10Z","updated_at":"2015-09-28T09:47:50Z","closed_at":null,"body":"Hi there,\r\n\r\nI just found that Resources's deserialize() methods ignores the \"format\" parameter.\r\nIt instead tries to get the format from the requests's content-type (falling back to application/json).\r\n\r\n```\r\n def deserialize(self, request, data, format='application/json'):\r\n        \"\"\"\r\n        Given a request, data and a format, deserializes the given data.\r\n        It relies on the request properly sending a ``CONTENT_TYPE`` header,\r\n        falling back to ``application/json`` if not provided.\r\n        Mostly a hook, this uses the ``Serializer`` from ``Resource._meta``.\r\n        \"\"\"\r\n        deserialized = self._meta.serializer.deserialize(data, format=request.META.get('CONTENT_TYPE', 'application/json'))\r\n        return deserialized\r\n```\r\nI would've sent in a pull req but I'm not sure which way to go - change \r\n```\r\nformat=request.META.get('CONTENT_TYPE', 'application/json')\r\n```\r\nto\r\n```\r\nformat=request.META.get('CONTENT_TYPE', format)\r\n```\r\nor  drop the parameter from the method?\r\n\r\nCheers,\r\nPatrick\r\n"},"comment":{"url":"https://api.github.com/repos/django-tastypie/django-tastypie/issues/comments/143694242","html_url":"https://github.com/django-tastypie/django-tastypie/issues/1354#issuecomment-143694242","issue_url":"https://api.github.com/repos/django-tastypie/django-tastypie/issues/1354","id":143694242,"user":{"login":"HageMaster3108","id":6841412,"avatar_url":"https://avatars.githubusercontent.com/u/6841412?v=3","gravatar_id":"","url":"https://api.github.com/users/HageMaster3108","html_url":"https://github.com/HageMaster3108","followers_url":"https://api.github.com/users/HageMaster3108/followers","following_url":"https://api.github.com/users/HageMaster3108/following{/other_user}","gists_url":"https://api.github.com/users/HageMaster3108/gists{/gist_id}","starred_url":"https://api.github.com/users/HageMaster3108/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HageMaster3108/subscriptions","organizations_url":"https://api.github.com/users/HageMaster3108/orgs","repos_url":"https://api.github.com/users/HageMaster3108/repos","events_url":"https://api.github.com/users/HageMaster3108/events{/privacy}","received_events_url":"https://api.github.com/users/HageMaster3108/received_events","type":"User","site_admin":false},"created_at":"2015-09-28T09:47:50Z","updated_at":"2015-09-28T09:47:50Z","body":"Apologies with f**cked up first Pull Req... The second one should be fine;)"}}