@not_implemented_for('multigraph')
def jit_data(G, indent=None):
    json_graph = []
    for node in G.nodes():
        json_node = {
            "id": node,
            "name": node
        }
        # node data
        json_node["data"] = G.node[node]
        # adjacencies
        if G[node]:
            json_node["adjacencies"] = []
            for neighbour in G[node]:
                adjacency = {
                    "nodeTo": neighbour,
                }
                # adjacency data
                adjacency["data"] = G.edge[node][neighbour]
                json_node["adjacencies"].append(adjacency)
        json_graph.append(json_node)
    return json.dumps(json_graph, indent=indent)
Return data in JIT JSON format.
dataset/ETHPy150Open networkx/networkx/networkx/readwrite/json_graph/jit.py/jit_data