code: def json_parse(self, response):
          
          try:
              data = response.json()
          except ValueError:
              data = {'meta': { 'status': 500, 'msg': 'Server Error'}, 'response': {"error": "Malformed JSON or HTML was returned."}}
  
          # We only really care about the response if we succeed
          # and the error if we fail
          if 200 <= data['meta']['status'] <= 399:
              return data['response']
          else:
              return data
docs: Wraps and abstracts response validation and JSON parsing
          to make sure the user gets the correct response.
  
          :param response: The response returned to us from the request
  
          :returns: a dict of the json response