Closed curran closed 8 years ago
Maybe better to call it deserialize
?
This should probably mirror D3 in that it should support an optional id function that defaults to the index in the nodes array.
Not sure the id function idea makes sense actually, because as it stands, the data structure only is capable of representing nodes as strings, without storing any metadata. So parsing a graph that uses an id function would mean just using the ids of links as the nodes, and not even looking at the nodes
array at all. Not implementing for now.
There is now a
serialize()
function, so probably we should add its inverse, maybe call itgraph.parse(serialized)
?