You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a proposal @niklaslmade in response to the proposal to support "@container": "@language" (#133):
@container is already a mechanism for letting the two currently defined container keywords, @set and @list, interpret a given array in their own specific way. We can extend the behaviour of @container to let all of @language, @id, @typeand regular terms treat an object as a map, in their own, specific ways.
To keep the discussion focused, let's concentrate on "@container": "@id" in this issue (and call it a subject map) and create separate ones for @type and regular terms if required.
Here's an example of using @container with @id (one without aliasing @graph as Niklas did):
{
"@context": {
"ex": "http://example.com/",
"name": "http://xmlns.com/foaf/0.1/name",
"homepage": { "@id": "http://xmlns.com/foaf/0.1/homepage", "@type": "@id" },
"knows": { "@id": "http://xmlns.com/foaf/0.1/knows", "@container": "@id" }
},
"@id": "ex:Markus",
"name": "Markus",
"homepage": "http://www.markus-lanthaler.com/",
"knows": {
"ex:Niklas": {
****** what would happen if a different @id would be defined here? *****
"name": "Niklas",
"homepage": "http://neverspace.net/"
}
}
}
So, I think this works. I would say that @id in the object trumps the property. I think this might be simpler to work in with the current expansion algorithm too.
This is a proposal @niklasl made in response to the proposal to support
"@container": "@language"
(#133):To keep the discussion focused, let's concentrate on
"@container": "@id"
in this issue (and call it a subject map) and create separate ones for@type
and regular terms if required.Here's an example of using
@container
with@id
(one without aliasing@graph
as Niklas did):This would be expanded to:
A couple of questions:
@id
Gregg originally proposed to use something he called "folding" for this and #133:
The text was updated successfully, but these errors were encountered: