pub fn write_json<T>( path: impl AsRef<Path>, value: &T, pretty: bool, ) -> Result<()>where T: Serialize,
Write a value as JSON to a file.