parameters: (config_file_name: str)
return_statement: return json_config
docstring: Reads and validate custom replacement configuration file config_file_name.
      :param config_file_name: name of the file to read from.
      :return: A dictionary serialized from json config file.
docstring_summary: Reads and validate custom replacement configuration file config_file_name.
      :param config_file_name: name of the file to read from.
      :return: A dictionary serialized from json config file.
docstring_tokens: Reads and validate custom replacement configuration file config_file_name . : param config_file_name : name of the file to read from . : return : A dictionary serialized from json config file .
function: def load_and_validate_json_config(config_file_name: str):
      """
      Reads and validate custom replacement configuration file config_file_name.
      :param config_file_name: name of the file to read from.
      :return: A dictionary serialized from json config file.
      """
      try:
          with open(config_file_name, 'r') as f:
              json_config = json.load(f)
              try:
                  import fastjsonschema as json_validate
  
                  validator = json_validate.compile(schema_dict)
                  validator(json_config)
              except ModuleNotFoundError as e:
                  log.error("Module 'fastjsonschema' for json validation not installed. Please update requirements.",
                            extra={'is_warning': True})
  
      except Exception as e:
          raise Error("Failed to parse custom replacements configuration file '{}': {}. ".format(config_file_name, e) +
                      refer_to_faq_msg(70)) from e
  
      return json_config
function_tokens: def load_and_validate_json_config ( config_file_name : str ) : try : with open ( config_file_name , 'r' ) as f : json_config = json . load ( f ) try : import fastjsonschema as json_validate validator = json_validate . compile ( schema_dict ) validator ( json_config ) except ModuleNotFoundError as e : log . error ( "Module 'fastjsonschema' for json validation not installed. Please update requirements." , extra = { 'is_warning' : True } ) except Exception as e : raise Error ( "Failed to parse custom replacements configuration file '{}': {}. " . format ( config_file_name , e ) + refer_to_faq_msg ( 70 ) ) from e return json_config