Function write_json_file

Source
pub fn write_json_file<T: Serialize>(path: &Path, obj: &T) -> Result<()>
Expand description

Writes the given serializable object as JSON to the specified file path using pretty printing. Returns an error if the file cannot be created or if serialization/writing fails.