pub fn delete_fragment(config_json: &str, fragment_code: &str) -> Result<String>Expand description
Delete a fragment from the configuration
§Arguments
config_json- Configuration JSON stringfragment_code- Fragment code to delete
§Returns
Returns modified configuration JSON on success
§Example
use sz_configtool_lib::fragments;
let config = r#"{"G2_CONFIG": {"CFG_ERFRAG": [{"ERFRAG_ID": 1, "ERFRAG_CODE": "TEST"}]}}"#;
let modified = fragments::delete_fragment(config, "TEST").unwrap();