Source code for networkx.readwrite.json_graph.node_link

#    Copyright (C) 2011-2016 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 json
import networkx as nx
from networkx.utils import make_str, to_tuple
from tempfile import NamedTemporaryFile
__all__ = ['node_link_data', 'node_link_graph']


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