-
Notifications
You must be signed in to change notification settings - Fork 35
Updates and tests for @included
as an array of node objects.
#128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So my understanding of this feature is that it allows you to specify node objects wherever you'd like without needing a predicate for them. It doesn't mean that they are necessarily in the default graph; if @included
appeared within a named graph branch of the JSON tree, then those node objects would also be in that named graph. Is that correct?
Essentially, this is a way to use @graph
(when we use it to express an array of nodes where that graph has no single root... aka a "bush") anywhere in the document and have it apply to whatever @graph
is currently being expressed.
If I understand this properly, then I think it's much simpler and easier to understand than what we were looking at before (despite there perhaps only being minor differences). I also think it's a good feature that others have been asking for in the past and it will be helpful with "found JSON". In a future version, perhaps we can also add some framing mechanism to produce it algorithmically.
I'm not sure about the name ... maybe @include
follows our naming convention better, but perhaps there's an even better term, but that's just bikeshedding.
common/terms.html
Outdated
@@ -225,6 +225,9 @@ | |||
A <a>named graph</a> created from the value of a <a>map entry</a> | |||
having an <a>expanded term definition</a> | |||
where <code>@container</code> is set to <code>@graph</code>.</dd> | |||
<dt class="changed"><dfn data-cite="JSON-LD11#dfn-included-block">included block</dfn></dt><dd class="changed"> | |||
An <a>included block</a> is an <a>entry</a> in a <a>node object</a> where the key is `@included` or an alias |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An <a>included block</a> is an <a>entry</a> in a <a>node object</a> where the key is `@included` or an alias | |
An <a>included block</a> is an <a>entry</a> in a <a>node object</a> where the key is either `@included` or an alias of `@included` |
Well, in any node object, not anyplace at all. It doesn't mean that they are necessarily in the default graph; if Yes.
I haven’t experimented with framing, but it shouldn’t require too much to make it work.
I raised that concern last time, but it reuses the name from json.api, not that I think we need be bound by that. Note an area I didn’t go to is if a node with |
Right.
Right ... I'm not sure. My inclination would be that it's just more information in the graph that someone happened to drop into the list; it could have been anywhere. My understanding of But I admit I haven't thought deeply about it. I don't know how "json.api" uses it in a similar circumstance and if its semantics change then. |
In the Flattening algorithm, if a node object with |
…he containing node object. Changes Flattening and expected toRdf tests.
For w3c/json-ld-syntax#19.
@dlongley If you could see if this formulation works better for you. At this point
@included
is an array of node objects, sort of like@graph
. Fairly small impact on both Expansion and Flattening algorithms.We could extend to allow id-maps, type-maps and so forth, but that doesn't provide any really new functionality.
Preview | Diff