code: def from_json(json_data):
          
          # If we have a string, then decode it, otherwise assume it's already decoded
          if isinstance(json_data, str):
              data = json.loads(json_data)
          else:
              data = json_data
          oauth_dict = {
                        'client_id':data.get('oauth',{}).get('client_id',None),
                        'client_secret':data.get('oauth',{}).get('client_secret',None),
                        'redirect_url':data.get('oauth',{}).get('redirect_url',None),
                        }
          client = Client(api_key=data.get('api_key',None),
                          api_url=data.get('api_url',None),
                          oauth=oauth_dict,
                          use_cache=data.get('use_cache',None),
                          cache_dir=data.get('cache_dir',None),
                          update_cache=data.get('update_cache',None),
                          verifySSL=data.get('oauth',{}).get('verifySSL',None)
                          )
          client.cache = Cache.from_json(data.get('cache',None))
          client.oauth = OAuth2.from_json(data.get('oauth',None))
          return client
docs: Returns a pyalveo.Client given a json string built from the client.to_json() method.