DIP-105
June 16, 2023 ยท View on GitHub
graph
Following the convention of DIP-102, a new wordType will be introduced: graph.
Background:
In DCoSL, data is represented as a graph, with nodes and edges. DIP-100 and DIP-103 provides conventions for nodes and edges, respectively. In this DIP, we provide conventions for representation of the graph itself.
Declaration
See here.
Properties
Under graphData, three properties are introduced:
- nodes: an array of words, identified by one or more unique identifiers, such as
slug - relationships: an arry of objects, each one of which describes a relationship between two nodes
- graphs: a list of other graphs which may be imported
Example:
{
"wordData": {
"wordTypes": ["relationship"],
},
"graphData": {
"nodes": [
{
"slug": "foo"
},
{
"slug": "bar"
},
],
"relationships": [
{
"nodeFrom": {
"slug": "foo"
},
"relationshipType": {
"slug": "subsetOf"
},
"nodeTo": {
"slug": "bar"
},
}
],
"graphs": []
},
...
}