Warning

This documents an unmaintained version of NetworkX. Please upgrade to a maintained version and see the current NetworkX documentation.

Source code for networkx.readwrite.json_graph.node_link

#    Copyright (C) 2011-2019 by
#
#    Aric Hagberg <hagberg@lanl.gov>
#    Dan Schult <dschult@colgate.edu>
#    Pieter Swart <swart@lanl.gov>
#    Michael E. Rose <Michael.Ernst.Rose@gmail.com>
#
#    All rights reserved.
#    BSD license.
from itertools import chain, count
import networkx as nx
from networkx.utils import make_str, to_tuple
__all__ = ['node_link_data', 'node_link_graph']


_attrs = dict(source='source', target='target', name='id',
              key='key', link='links')