save a graph with json code example
Example: save networkx graph to json
# Save graph
nx.write_gml(G, "path_where_graph_should_be_saved.gml")
# Read graph
G = nx.read_gml('path_to_graph_graph.gml')
# Save graph
nx.write_gml(G, "path_where_graph_should_be_saved.gml")
# Read graph
G = nx.read_gml('path_to_graph_graph.gml')