Closed sholsapp closed 11 years ago
You cannot use JSON directly, you have to pass an array or object of edges (i.e. you have to parse the JSON first). It basically accepts the same data structures as the Python version. For example:
jsnx.Graph([[1,2], [2,3]]);
// or
jsnx.Graph({2: [1,3]});
Okay, thanks. It's easy enough to convert the JSON object into this format.
I have JSON prepared from the Python version of networkx, and it's unclear if I can create a jsnetworkx object from this JSON data at https://github.com/fkling/JSNetworkX/blob/master/jsnx/classes/graph.js#L45.
Is this possible?