Re: Named Graphs / Layers / Surfaces / Doohickies added to JSON-LD

On 04/30/2012 06:46 PM, Sandro Hawke wrote:
>> http://json-ld.org/spec/latest/json-ld-syntax/
>
> I'm not quite sure I understand the syntax, but if my guesses are
> right, it seems like a reasonable design.   Excellent.   Glad to hear
> JSON-LD is ready for broader attention.

The syntax for a named graph in JSON-LD associates an IRI with a graph
data structure. So if you have this graph

"@graph": [{
    "@id": "http://example.com/sandro#me",
    "name": "Sandro",
    "knows": "http://ivan.com/#me"
}]

triples:

<http://example.com/sandro#me> foaf:name "Sandro".
<http://example.com/sandro#me> foaf:knows <http://ivan.com/#me>.

You can "name" the graph by doing this:

"@id": "_:theNameOfTheGraph",
"@graph": [{
    "@id": "http://example.com/sandro#me",
    "name": "Sandro",
    "knows": "http://ivan.com/#me"
}]

quads:

<http://example.com/sandro#me> foaf:name "Sandro" _:theNameOfTheGraph.
<http://example.com/sandro#me> foaf:knows <http://ivan.com/#me>
_:theNameOfTheGraph.

or this:

"@id": "http://example.com/info/8dj3kf82jdfhjw832kd",
"@graph": {
    "foo": "Sandro",
    "bar": "Ivan"

or anything, really - JSON-LD doesn't attempt to limit the type of IRI
identifiers you can give named graphs.

> This text uses the word "graph" to mean g-box (now "layer", for me),
> not to mean RDF Graph.   At least, I'm 99% sure it does.  It makes
> almost no sense to talk about an RDF Graph that way, giving it a
> human-readable HTTP URL.

A couple of high-level thoughts that I don't have time to go into:

* Really, really don't like all of the new terminology that the group
   is creating - having both 'graph' and 'layer' doesn't help simplify
   this stuff to Web developers. Use a base word, like 'graph' and
   modify it for the different types of graphs - graph snapshot,
   graph container, etc.
* We give human-readable HTTP URLs to graphs all the time - aren't these
   "named graphs" called Web pages containing RDFa and/or Microdata?

-- manu

-- 
Manu Sporny (skype: msporny, twitter: manusporny)
President/CEO - Digital Bazaar, Inc.
blog: PaySwarm Website for Developers Launched
http://digitalbazaar.com/2012/02/22/new-payswarm-alpha/

Received on Friday, 4 May 2012 03:14:03 UTC