Migrating from JSON Graph
JSON Graph v2 is the best JSON Graph format before this one. It lacks some features from GraphML (i.e., mixed direction hyperedges).
JSON Graph should be parsed using the Vocabulary and Aliases extension. The metadata
property is allowed at any structural element (see Data).
Required changes to put existing JSON Graph data in Connected JSON:
JSON Graph |
Connected JSON |
---|---|
Node and edge ids are map key |
Ids part of node and edge objects. |
A Connected JSON parser MAY accept
-
a
nodes
object and interpret each key as a node.id
, -
a
edges
object and interpret each key as an edge.id
. -
Furthermore, an edge.
nodes
:array
of ids may be interpreted as a list of endpoints with the given node ids. This is similar to the processing ofsource
andtarget
.
Given these optional extensions, any valid JSON Graph Document should parse with the same semantics as a Connected JSON document.