pub fn load_vrt_from_str(json: &str) -> Result<VrtTaxonomy, Error>Expand description
Deserializes a VRT taxonomy from a JSON string
§Arguments
json- JSON string containing the VRT data
§Errors
Returns an error if the JSON is invalid
§Example
use bugcrowd_vrt::load_vrt_from_str;
let json = r#"[{"id": "test", "name": "Test", "type": "category", "children": []}]"#;
let taxonomy = load_vrt_from_str(json).expect("Failed to parse VRT");
assert_eq!(taxonomy.len(), 1);