pub fn load_config(config_path: &str) -> Result<PrincipalConfig, Error> {
        println!("Loading Principal config: {:?}", config_path);
        let mut f = File::open(config_path)?;

        let mut contents = String::new();
        f.read_to_string(&mut contents)?;

        Ok(serde_json::from_str(&contents)?)
    }
// load json config into the struct
load json config into the struct
load json config into the struct
pub fn load_config(config_path: &str) -> Result<PrincipalConfig, Error> {
        println!("Loading Principal config: {:?}", config_path);
        let mut f = File::open(config_path)?;
        let mut contents = String::new();
        f.read_to_string(&mut contents)?;
        Ok(serde_json::from_str(&contents)?)
    }
pub fn load_config ( config_path : & str ) -> Result < PrincipalConfig , Error > { println ! ( " " config_path ) ; let mut f = File :: open ( config_path ) ? ; let mut contents = String :: new ( ) ; f . read_to_string ( & mut contents ) ? ; Ok ( serde_json :: from_str ( & contents ) ? ) }
load json config into the struct
load json config into the struct
config_path
&str
config_path
&str