def convert_config_from_json(config):
 logging.info(('Configuration for app:' + str(config)))
 try:
  config = json.loads(config)
 except ValueError as error:
  logging.error(('%s Exception--Unable to parse configuration: %s' % (error.__class__, str(error))))
  return None
 except TypeError as error:
  logging.error(('%s Exception--Unable to parse configuration: %s' % (error.__class__, str(error))))
  return None
 if is_config_valid(config):
  return config
 else:
  return None

def convert_config_from_json ( config ) : logging . info ( ( 'Configuration for app:' + str ( config ) ) ) try : config = json . loads ( config ) except ValueError as error : logging . error ( ( '%s Exception--Unable to parse configuration: %s' % ( error . __class__ , str ( error ) ) ) ) return None except TypeError as error : logging . error ( ( '%s Exception--Unable to parse configuration: %s' % ( error . __class__ , str ( error ) ) ) ) return None if is_config_valid ( config ) : return config else : return None
takes the configuration in json format and converts it to a dictionary .