W3C home > Mailing lists > Public > public-linked-json@w3.org > May 2011

Re: Graphs in JSON

From: glenn mcdonald <glenn@furia.com>
Date: Tue, 17 May 2011 14:34:24 -0400
Message-ID: <BANLkTi=1Kp4TfDptLccGwVLXWyoNEWxCbA@mail.gmail.com>
To: nathan@webr3.org
Cc: Manu Sporny <msporny@digitalbazaar.com>, Linked JSON <public-linked-json@w3.org>
>
> Just a quick question, how would you handle Arcs that are also points, for
> example the following in RDF
>
>  </foo> </bar> "Baz" .
>  </bar> x:label "Bar" .


Well, that specific case is unnecessary, since my scheme uses readable
strings for the arcs, but to answer the general question, a complete,
self-describing graph would include the type-schema in the data as points,
too. So each type has a point, and an Arc arc to points representing the
arcs, so we might have these:

{
  "ID": 5,
  "Name": "Artist",
  "Arcs": {
    "Type": [1],
    "Arc": [7,9]
  }
},
{
  "ID": 7
  "Name": "Album",
  "Arcs": {
    "Type": [2],
    "From": [5],
    "To": [6],
    "Inverse": [8]
  }
}

where the first is the data point for the type "Artist" (point 1 here is the
type Type), and the second is the data point for the arc called "Album" from
Artists to Albums (point 2 is the type Arc). Each arc knows which type it's
coming from, which type it's going to, and its inverse (so point 8 here
would be the data point for the corresponding Artist arc from Albums to
Artists).

glenn
Received on Tuesday, 17 May 2011 18:35:12 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:25:34 GMT