pub fn write_json(path: &Path, value: &impl Serialize) -> Result<()>
Write value as JSON through a rename, so a reader never sees half a file.
value
The file cannot be written or renamed into place.