def METHOD_NAME(self, conf_fobj):
    """Populate config parameters from the given file.
    Parse it as JSON and store in self all configuration properties
    it defines. Log critical message and return False if anything
    goes wrong or seems odd.
    conf_fobj (file-like object): the config file.
    returns (bool): whether parsing was successful.
    """
    # Parse config file.
    try:
        data = json.load(conf_fobj)
    except ValueError:
        logger.critical("Config file is invalid JSON.")
        return False
    # Store every config property.
    for key, value in data.items():
        if key.startswith("_"):
            continue
        if not hasattr(self, key):
            logger.critical("Invalid field %s in config file, maybe a "
                            "typo? (use leading underscore to ignore).",
                            key)
            return False
        setattr(self, key, value)
    return True