the best way to create graph from json file networkx 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')