W3C home > Mailing lists > Public > public-linked-json@w3.org > January 2012

Multiple graphs syntax (ISSUE-68)

From: Markus Lanthaler <markus.lanthaler@gmx.net>
Date: Wed, 1 Feb 2012 01:35:42 +0800
To: "'Linked JSON'" <public-linked-json@w3.org>
Message-ID: <013b01cce03e$c409ea00$4c1dbe00$@lanthaler@gmx.net>
Currently we have a 

{
  "@context": "...",
  "@id" : [
     { "@id": ..." },
     { "@id": ..." }
  ]
}

shorthand to avoid the need to re-declare the context in every disjoint
graph as you normally would have to do:

[
  { "@context": "...", "@id": "..." },
  { "@context": "...", "@id": "..." }
]


I think the easiest solution for this issue is to just remove the @id: @id
"optimization". 

So, requiring an array at the top level would be cleanest solution IMO.
Since the graphs are disjoint, it would even be fair to assume that they
don't share the same context. If they are really the same, then well, one
has to define them twice. Is that really such a bad thing?

P.S.: Ivan proposed a @data keyword that could be used as the "root"
element. I think that's overhead for an optimization which we don't really
need. If someone would have to serialize a large number of disjoint graphs,
he could simply put the context in an external file.



--
Markus Lanthaler
@markuslanthaler
Received on Tuesday, 31 January 2012 17:36:19 GMT

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