I am trying to create a Graph with networkx but for some reason, I am not getting it.
The 'graph' json file looks like this:
graph = {'A': ['B', 'C', 'E'],
'B': ['A','D', 'E'],
'C': ['A', 'F', 'G'],
'D': ['B'],
'E': ['A', 'B','D'],
'F': ['C'],
'G': []}
I am using this code
G = nx.read_adjlist("graph.json", create_using=nx.DiGraph())
nx.draw_networkx(G)
output:
Which is not right according to the adjacency list, 'graph'.
Cheers!

read_adjlistdeals only with the defined format.