code: def _get_json_response(self, resp):
          ''' Parse a JSON response '''
          if resp is not None and resp.text is not None:
              try:
                  text = resp.text.strip('\n')
                  if len(text) > 0:
                      return json.loads(text)
              except ValueError as e:
                  if self.debug:
                      print("Could not decode JSON response: \"%s\"" % resp.text)
                  raise f _get_json_response(self, resp):
          ''' Parse a JSON response '''
          if resp is not None and resp.text is not None:
              try:
                  text = resp.text.strip('\n')
                  if len(text) > 0:
                      return json.loads(text)
              except ValueError as e:
                  if self.debug:
                      print("Could not decode JSON response: \"%s\"" % resp.text)
                  raise e
docs: Parse a JSON response