pub fn to_json(data: HashMap<String, Vec<TreeType>>) -> StringExpand description
Converts the hashmap data to json string.
use std::collections::HashMap;
use std::path::Path;
use tree_mapper::{explore, to_json};
use tree_mapper::TreeType;
let base_path: String = String::from("storage/test-data");
let mut data: HashMap<String,Vec<TreeType>> = HashMap::new();
explore(Path::new(&base_path),&mut data,1);
let mapping:String = to_json(data);
println!("{}",mapping);