diff --git a/requests/models.py b/requests/models.py index ab91c1c0..7fe40a5e 100644 --- a/requests/models.py +++ b/requests/models.py @@ -542,6 +542,11 @@ class Response(object): except ValueError: return None + def iter_json(self): + for line in self.iter_lines(): + if line: # filter out keep-alive new lines + yield json.loads(line) + @property def links(self): """Returns the parsed header links of the response, if any."""