pub fn parse_to_hashmap(ccl_content: &str) -> Result<HashMap<String, Value>>Expand description
Parse CCL string into a HashMap where values can be either arrays or objects
This function works around serde_ccl’s limitation where it returns strings for nested structures instead of properly parsed values.
§Examples
use santa_data::parse_to_hashmap;
use serde_json::Value;
let ccl = r#"
simple_pkg =
= brew
= scoop
complex_pkg =
_sources =
= brew
brew = gh
"#;
let result = parse_to_hashmap(ccl).unwrap();
assert!(result.contains_key("simple_pkg"));
assert!(result.contains_key("complex_pkg"));