pub fn remove_config_section(
config_json: &str,
section_name: &str,
) -> Result<String>Expand description
Remove a configuration section
§Arguments
config_json- Configuration JSON stringsection_name- Name of the section to remove
§Returns
Returns modified configuration JSON on success
§Example
use sz_configtool_lib::config_sections;
let config = r#"{"G2_CONFIG": {"CFG_CUSTOM": []}}"#;
let modified = config_sections::remove_config_section(config, "CFG_CUSTOM").unwrap();