Re: Multiple graphs syntax (ISSUE-68)

On Jan 31, 2012, at 10:59 AM, Markus Lanthaler wrote:

>>> What is the intended end use of this RDFa to JSON-LD conversion? You
>> could,
>>> e.g., directly create an expanded document without any contexts in
>> it.
>> 
>> It is a json serialization of RDFa. Actually, forget about RDFa. The
>> same issue happens when you want to serialize any RDF graph. There
>> isn't, necessarily, a "root" that one could use. If we take it
>> seriously that json ld is (also) a serialization format for RDF,
>> alongside, say, Turtle, then this issue arises.
> 
> The question is where the context comes in to play and how the data is going
> to be used afterwards. Having everything expanded would be fine for some use
> cases I think, that's why I asked

Certainly, JSON-LD can be used as a simple dump format, similar to N-Triples, where everything is expanded. In my case of serializing RDF to JSON-LD, and where I think Ivan is coming from, is that it would be good to have a nice "out of the box" experience, similar to what you can get with Turtle, without resorting to compaction. My own implementation makes use of provided prefix definitions along with an RDF graph to do a best-effort in creating a readable JSON-LD document, construction the @context on the fly. IMO, this is a perfectly legitimate use of JSON-LD as a serialization format. Restricting JSON-LD to operate only on graphs with a single root seems like an unnecessary restriction. Requiring that the context be repeated for each root also seems needlessly complicated.

It's really just a matter of describing what the value of an array is when used with @id. In the top-level case, it is not the value of anything, so there is no issue, the issue is when it is used as the value of a property, for which I don't see any reasonable use case, and so think that defining the value as being the last value of the array solves the issue.

Gregg

> --
> Markus Lanthaler
> @markuslanthaler
> 
> 
> 
> 
> 

Received on Tuesday, 31 January 2012 19:28:01 UTC