Skip to content
Myr

Use complexjson everywhere

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Cory Benfield · committed by Ian Cordasco · parent 395a3e8 · Browse files · 1 file+4 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−2 removed

  • other:+4 added−2 removed

1 file+4 added−2 removed

modified:requests/models.py+4 added-2 removed
791 unmodified lines
792 # a best guess).793 encoding = guess_json_utf(self.content)794 if encoding is not None:795 try:796 return json.loads(self.content.decode(encoding), **kwargs)796 return complexjson.loads(797 self.content.decode(encoding), **kwargs798 )799 except UnicodeDecodeError:800 # Wrong UTF codec detected; usually because it's not UTF-8801 # but some other 8-bit codec. This is an RFC violation,802 # and the server didn't bother to tell us what codec *was*803 # used.804 pass803 return json.loads(self.text, **kwargs)805 return complexjson.loads(self.text, **kwargs)806807 @property808 def links(self):809 """Returns the parsed header links of the response, if any."""
36 unmodified lines