'Returns the json-encoded content of a response, if any.'

@property
def json(self):

    if ((not self.encoding) and (len(self.content) > 3)):
        encoding = guess_json_utf(self.content)
        if (encoding is not None):
            try:
                return json.loads(self.content.decode(encoding))
            except (ValueError, UnicodeDecodeError):
                pass
    try:
        return json.loads((self.text or self.content))
    except ValueError:
        return None
