From: Kamil Kisiel Date: Mon, 17 Dec 2012 19:02:06 +0000 (-0800) Subject: Fixed a few spots in the docs that were still using json as a property. X-Git-Tag: v1.0.3~6^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fe0b0a989fad80a300d2cf940d58370d13cc9e42;p=services%2Fpython-requests.git Fixed a few spots in the docs that were still using json as a property. --- diff --git a/docs/index.rst b/docs/index.rst index 64929d1..c43a8de 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -27,7 +27,7 @@ Things shouldn’t be this way. Not in Python. 'utf-8' >>> r.text u'{"type":"User"...' - >>> r.json + >>> r.json() {u'private_gists': 419, u'total_private_repos': 77, ...} See `similar code, without Requests `_. diff --git a/docs/user/quickstart.rst b/docs/user/quickstart.rst index beb05a5..c2f38b2 100644 --- a/docs/user/quickstart.rst +++ b/docs/user/quickstart.rst @@ -128,10 +128,10 @@ 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 + >>> r.json() [{u'repository': {u'open_issues': 0, u'url': 'https://github.com/... -In case the JSON decoding fails, ``r.json`` simply returns ``None``. +In case the JSON decoding fails, ``r.json`` raises an exception. Raw Response Content