w3c / json-ld-syntax

JSON-LD 1.1 Specification
https://w3c.github.io/json-ld-syntax/
Other
112 stars 22 forks source link

Describe included blocks. #208

Closed gkellogg closed 5 years ago

gkellogg commented 5 years ago

For #19.


Preview | Diff

azaroth42 commented 5 years ago

LGTM! :)

azaroth42 commented 5 years ago

(Sorry, misclick)

iherman commented 5 years ago

Can we simplify the example to contain only what is really necessary to understand the feature? From the point of view of this feature aliasing @type, @id, or indeed @included, but also the usage of @base seems to be totally irrelevant. The same for the usage of type for the included objects.

This would help the user concentrating on what is really essential in this case...

(Otherwise it looks o.k. to me...)

gkellogg commented 5 years ago

The example came from Rob’s original use case, but I can simplify it easily enough.

iherman commented 5 years ago

Actually... the comment of @dlongley in https://github.com/w3c/json-ld-syntax/issues/128#issuecomment-516936845 made me realize that, at least for me, the most important aspect of this feature is not what is in the proposed text. Indeed, what @included can replace is the misleading top level @graph when what one wants to expess is a “bush”, ie, several top level objects with their (recursive) properties. This is used all over the place in Turtle data, and for which the only solution in JSON-LD 1.0 is to use a top-level @graph property whoise value is... not a graph in the dataset sense (certainly not the same way as when a TriG data is encoded in JSON-LD).

If my understanding is indeed correct, I would think that such an example should be “the” core example for this feature, and the cross references in @azaroth42’s example is just a welcome consequence...

Or, at least, this fact should be emphasized in the text imho.

gkellogg commented 5 years ago

@iherman Please suggest some text and an example to help flesh this out in the spec. I'll be happy to integrate it into the text.

dlongley commented 5 years ago

@iherman,

Indeed, what @included can replace is the misleading top level @graph when what one wants to expess is a “bush”, ie, several top level objects with their (recursive) properties.

Yes, this is also my understanding -- I left a comment to similar effect over on the API PR:

https://github.com/w3c/json-ld-api/pull/128#pullrequestreview-269051034

iherman commented 5 years ago

@gkellogg

@iherman Please suggest some text and an example to help flesh this out in the spec. I'll be happy to integrate it into the text.

Hopefully, the PR over this PR works: https://github.com/w3c/json-ld-syntax/pull/209

iherman commented 5 years ago

This issue was discussed in a meeting.