pub fn serialize_graph<N, E, Ty>(g: &Graph<N, E, Ty>) -> Result<String, Error>where N: Serialize + Clone, E: Serialize + Clone, Ty: EdgeType + 'static,
Serialize a graph to JSON format.
Returns a JSON string representation of the graph.