Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Update the advanced doc to use the r.json method #1085
commented on the diff
Jan 6, 2013
|@@ -313,17 +313,12 @@ out what type of content it is. Do this like so::|
|-So, GitHub returns JSON. That's great, we can use the JSON module to turn it|
|-into Python objects. Because GitHub returned UTF-8, we should use the|
|-``r.text`` method, not the ``r.content`` method. ``r.content`` returns a|
|-bytestring, while ``r.text`` returns a Unicode-encoded string. I have no plans|
|-to perform byte-manipulation on this response, so I want any Unicode code|
|+So, GitHub returns JSON. That's great, we can use the ``r.json`` method to|