Hacker News new | past | comments | ask | show | jobs | submit login

A general graph is a tree without the restriction that a node can have at most one parent.



Correct.

So how is JSON a graph? Or maybe the answer is just, No. Not generally. I'm confused by your question.


You're just repeating what I originally asked?


Fine, let me be clear then.

No. JSON is not a graph.

Any visualization of a graph from JSON would be a specific encoding of a graph (probably using IDs) which is not generally interpreted as a graph.


Tree is a type of graph, though.


Each object is a node.

{ Left:{}, Right:{} }

Has a tree with 3 nodes

If you don't parse the JSON, you tend to traverse it as a graph




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: