parameters: (cls, s)
return_statement: return retval
docstring: Instantiate a Credentials object from a JSON description of it. The JSON
      should have been produced by calling .to_json() on the object.
  
      Args:
        data: dict, A deserialized JSON object.
  
      Returns:
        An instance of a Credentials subclass.
docstring_summary: Instantiate a Credentials object from a JSON description of it. The JSON
      should have been produced by calling .to_json() on the object.
docstring_tokens: Instantiate a Credentials object from a JSON description of it . The JSON should have been produced by calling . to_json () on the object .
function: def from_json(cls, s):
      """Instantiate a Credentials object from a JSON description of it. The JSON
      should have been produced by calling .to_json() on the object.
  
      Args:
        data: dict, A deserialized JSON object.
  
      Returns:
        An instance of a Credentials subclass.
      """
      data = simplejson.loads(s)
      if 'token_expiry' in data and not isinstance(data['token_expiry'],
          datetime.datetime):
        try:
          data['token_expiry'] = datetime.datetime.strptime(
              data['token_expiry'], EXPIRY_FORMAT)
        except:
          data['token_expiry'] = None
      retval = cls(
          data['access_token'],
          data['client_id'],
          data['client_secret'],
          data['refresh_token'],
          data['token_expiry'],
          data['token_uri'],
          data['user_agent'],
          revoke_uri=data.get('revoke_uri', None),
          id_token=data.get('id_token', None),
          token_response=data.get('token_response', None))
      retval.invalid = data['invalid']
      return retval
function_tokens: def from_json ( cls , s ) : data = simplejson . loads ( s ) if 'token_expiry' in data and not isinstance ( data [ 'token_expiry' ] , datetime . datetime ) : try : data [ 'token_expiry' ] = datetime . datetime . strptime ( data [ 'token_expiry' ] , EXPIRY_FORMAT ) except : data [ 'token_expiry' ] = None retval = cls ( data [ 'access_token' ] , data [ 'client_id' ] , data [ 'client_secret' ] , data [ 'refresh_token' ] , data [ 'token_expiry' ] , data [ 'token_uri' ] , data [ 'user_agent' ] , revoke_uri = data . get ( 'revoke_uri' , None ) , id_token = data . get ( 'id_token' , None ) , token_response = data . get ( 'token_response' , None ) ) retval . invalid = data [ 'invalid' ] return retval