pub fn write_json<T: Serialize, P: AsRef<Path>>( path: P, value: T, ) -> Result<(), Error>
Writes an object to a JSON file. This function will error if the file cannot be created or written to.