Function write_json_format
Source pub fn write_json_format<N, E, Ix, P>(
graph: &Graph<N, E, Ix>,
path: P,
weighted: bool,
) -> Result<()>
Expand description
Write an undirected graph to JSON format
§Arguments
graph - The graph to write
path - Path to the output file
weighted - Whether to include edge weights in the output
§Returns
Ok(()) - If the graph was written successfully
Err(GraphError) - If there was an error writing the file