pub fn list_fragments(config_json: &str) -> Result<Vec<Value>>Expand description
List all fragments in the configuration
§Arguments
config_json- Configuration JSON string
§Returns
Returns a vector of fragment objects in Python sz_configtool format
§Example
use sz_configtool_lib::fragments;
let config = r#"{"G2_CONFIG": {"CFG_ERFRAG": [{"ERFRAG_ID": 1, "ERFRAG_CODE": "TEST", "ERFRAG_SOURCE": "NAME", "ERFRAG_DEPENDS": ""}]}}"#;
let fragments = fragments::list_fragments(config).unwrap();
assert_eq!(fragments.len(), 1);