- From: Erik Isaksson <erikis@kth.se>
- Date: Mon, 25 Feb 2013 12:33:23 +0100
- To: JSON-LD CG <public-linked-json@w3.org>
Hi, I'd just like to mention an alternative for grouping nodes in the default graph. Instead of something like @default (like @graph but for the default graph) that I suggested earlier, there could be a keyword such as @node that embeds node objects, without any parent-child relationship. Such a keyword could be useful in many situations, both in the default and in named graphs, wherever embedding of node objects that reference each other is desired. This could be done without having to otherwise modify the document structure (such as having to put all node objects under @graph in the top-level object). And of course, in the case of wanting to use a shared context for multiple nodes at the document's top-level, @node could be used instead of @graph (and it would therefore be possible to remove @graph's special semantics of expressing the default graph in a top-level object without other properties than @graph and @context). I really like how it is possible in JSON-LD to either use an approach based purely on embedding, or an approach based on having multiple, flattened nodes at the top-level. With a keyword such as @node, it would be possible to combine some of the strengths of both approaches. A modified example 47: Using @node to apply a shared context to a group of nodes in the default graph { "@context": ..., "@node": [ { "@id": "http://manu.sporny.org/i/public", "@type": "foaf:Person", "name": "Manu Sporny", "knows": "http://greggkellogg.net/foaf#me" }, { "@id": "http://greggkellogg.net/foaf#me", "@type": "foaf:Person", "name": "Gregg Kellogg", "knows": "http://manu.sporny.org/i/public" } ] } Modifying Manu's example of two graphs (I think this makes it more clear that there are two nodes that are labels for two separate graphs): { "@context": ..., "@node": [ { "@graph": { "name": "Joe" } }, { "@graph": { "name": "Susan" } } ] } Best regards, Erik
Received on Monday, 25 February 2013 11:33:54 UTC