3 ms·
I take your point, though you're not directly comparing like with like. I'd used a literal translation of (V, E) so listed vertices explicitly as well as edges
by spinningslate 4y ago
I take your point, though you're not directly comparing like with like. I'd used a literal translation of (V, E) so listed vertices explicitly as well as edges. Using implicit representation (as you have), the json could be simplified to [["v1", "v2"], ["v1", "v3"]]. Still more syntax, definitely. But not far off, for example, the graphviz[0] equivalent in syntax overhead terms:
graph {
v1 -- v2;
v1 -- v3;
}
To be clear, I'm no apologist for json. It just seemed to me there was a pretty direct representation. @rzzzt's observation on json being predominantly hierarchical and therefore tree-shaped seems like the most likely reason behond the original statement.
--
[0] http://graphviz.org/ http://graphviz.org/