pub fn to_json_file<T, P>(value: &T, path: P) -> Result<()>where T: ?Sized + Serialize, P: AsRef<Path>,
Converts the value to a JSON string and writes it to the speficied file.