diff --git a/docs/user/quickstart.rst b/docs/user/quickstart.rst index 775970e7..316d9a12 100644 --- a/docs/user/quickstart.rst +++ b/docs/user/quickstart.rst @@ -111,6 +111,19 @@ use the following code: >>> i = Image.open(StringIO(r.content)) +JSON Response Content +--------------------- + +There's also a builtin JSON decoder, in case you're dealing with JSON data:: + + >>> import requests + >>> r = requests.get('https://github.com/timeline.json') + >>> r.json + [{u'repository': {u'open_issues': 0, u'url': 'https://github.com/... + +In case the JSON decoding fails, ``r.json`` simply returns ``None``. + + Raw Response Content --------------------