{"action":"created","issue":{"url":"https://api.github.com/repos/kennethreitz/requests/issues/2755","labels_url":"https://api.github.com/repos/kennethreitz/requests/issues/2755/labels{/name}","comments_url":"https://api.github.com/repos/kennethreitz/requests/issues/2755/comments","events_url":"https://api.github.com/repos/kennethreitz/requests/issues/2755/events","html_url":"https://github.com/kennethreitz/requests/issues/2755","id":104783245,"number":2755,"title":"allow custom JSONEncoder for the request's json param","user":{"login":"drmaples","id":165819,"avatar_url":"https://avatars.githubusercontent.com/u/165819?v=3","gravatar_id":"","url":"https://api.github.com/users/drmaples","html_url":"https://github.com/drmaples","followers_url":"https://api.github.com/users/drmaples/followers","following_url":"https://api.github.com/users/drmaples/following{/other_user}","gists_url":"https://api.github.com/users/drmaples/gists{/gist_id}","starred_url":"https://api.github.com/users/drmaples/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drmaples/subscriptions","organizations_url":"https://api.github.com/users/drmaples/orgs","repos_url":"https://api.github.com/users/drmaples/repos","events_url":"https://api.github.com/users/drmaples/events{/privacy}","received_events_url":"https://api.github.com/users/drmaples/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-03T21:14:09Z","updated_at":"2015-09-03T21:46:22Z","closed_at":"2015-09-03T21:20:34Z","body":"Using the [json param](http://docs.python-requests.org/en/latest/api/?highlight=json#requests.request) when making a request is awesome: \r\n```python\r\npayload = {'blip': 'blaz'}\r\nr = requests.get('http://foo.bar', json=payload)\r\n```\r\nUsing the [response property](http://docs.python-requests.org/en/latest/api/#requests.Response.json) is great as well, especially since you can use a custom json decoder:\r\n```python\r\nr.json(cls=MyCustomDecoder)\r\n```\r\n\r\nIt would be nice to allow a param to be passed that could be applied to the `dumps` of the [json value](https://github.com/kennethreitz/requests/blob/master/requests/models.py#L417-L419).\r\n```python\r\npayload = {'blip': Decimal(69)}\r\njson_params = {'cls': MyCustomEncoder}\r\nr = requests.get('http://foo.bar', json=payload, json_params=json_params)\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/kennethreitz/requests/issues/comments/137582948","html_url":"https://github.com/kennethreitz/requests/issues/2755#issuecomment-137582948","issue_url":"https://api.github.com/repos/kennethreitz/requests/issues/2755","id":137582948,"user":{"login":"Lukasa","id":1382556,"avatar_url":"https://avatars.githubusercontent.com/u/1382556?v=3","gravatar_id":"","url":"https://api.github.com/users/Lukasa","html_url":"https://github.com/Lukasa","followers_url":"https://api.github.com/users/Lukasa/followers","following_url":"https://api.github.com/users/Lukasa/following{/other_user}","gists_url":"https://api.github.com/users/Lukasa/gists{/gist_id}","starred_url":"https://api.github.com/users/Lukasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lukasa/subscriptions","organizations_url":"https://api.github.com/users/Lukasa/orgs","repos_url":"https://api.github.com/users/Lukasa/repos","events_url":"https://api.github.com/users/Lukasa/events{/privacy}","received_events_url":"https://api.github.com/users/Lukasa/received_events","type":"User","site_admin":false},"created_at":"2015-09-03T21:46:22Z","updated_at":"2015-09-03T21:46:22Z","body":"I think the better way is to manually use it yourself:\r\n\r\n```python\r\nr = requests.post('http://foo.bar', data=json.dumps(some_data, cls=CustomJSONEncoder), headers={'Content-Type': 'application/json'})\r\n```"}}