Multiple graphs syntax (ISSUE-68)

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 UTC