pub fn read_json_format<N, E, P>(path: P, weighted: bool) -> Result<Graph<N, E>>Expand description
Read an undirected graph from JSON format
§Arguments
path- Path to the input fileweighted- Whether to parse edge weights from the JSON
§Returns
Ok(Graph)- The graph read from the fileErr(GraphError)- If there was an error reading or parsing the file
§Format
The JSON format supports:
- Node declarations with optional labels and data
- Edge declarations with optional weights, labels, and data
- Graph metadata and directedness specification
- Flexible attribute storage for future extensions