pub fn write_json<O: ?Sized + Serialize, P: AsRef<Path>>( path: P, val: &O) -> Result<(), Error>
A simple function to write a serializable object to a json file.