-
Notifications
You must be signed in to change notification settings - Fork 60
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
require explicit @vocab or define prefix if custom terms used, to remove current "@vocab": "_:" hack #134
Comments
@elf-pavlik In your opinion, what is the best way to make a context document that extends AS? This is what I'm working with so far:
|
I'm -1 on this. While the |
To illustrate my concern better, I will modify example from Aggregation of Extensions. Let's also assume that both publishers served documents with AS2.0 published by ACME {
"@type": "Note",
"content": "This is a simple note",
"foo": 123
} AS2.0 document published by Baz Inc. {
"@type": "Note",
"content": "This is another note",
"foo": "2015-12-11T12:34:56Z"
} Once we merge them into single document, we get following in JSON-LD playground Compacted: {
"@context": "http://www.w3.org/ns/activitystreams",
"@graph": [{
"@type": "Note",
"content": "This is a simple note",
"foo": 123
}, {
"@type": "Note",
"content": "This is another note",
"foo": "2015-12-11T12:34:56Z"
}]
} Expanded: [
{
"@type": [
"http://www.w3.org/ns/activitystreams#Note"
],
"http://www.w3.org/ns/activitystreams#content": [
{
"@value": "This is a simple note"
}
],
"_:foo": [
{
"@value": 123
}
]
},
{
"@type": [
"http://www.w3.org/ns/activitystreams#Note"
],
"http://www.w3.org/ns/activitystreams#content": [
{
"@value": "This is another note"
}
],
"_:foo": [
{
"@value": "2015-12-11T12:34:56Z"
}
]
}
] As we see, consumer ends up with a data where property We could also avoid such situations by adding requirement in direction of:
IMO we should still also recommend for consumers not using JSON-LD Algorithms, to at least expand Compact IRIs as seen in current working draft as well as expand properties without prefixes with namespace from [
{
"@type": "Note",
"content": "This is a simple note",
"foo": 123
}, {
"@type": "Note",
"content": "This is another note",
"foo": "2015-12-11T12:34:56Z"
}
] |
I'm still -1 on this and I don't see any issue with your example. If the |
RESOLVED: Keep the spec as is: namespaces SHOULD be declared, unknown terms are ignored but passed onto the application as blank nodes (closes #134) |
+1 jasnell strengthen language in the spec about why you should give URLs to extension terms! |
I would see in place a strong and to the point explanation, something in direction:
|
I would like to propose requiring explicit
@vocab
in JSON-LD context, wherever data includes terms other than included in AS2.0 v2 context or already mapped to full URIs in local context. Those URIs only SHOULD (not MUST) to return useful description of a term - HTTP 404 also conforming in this case!http://jasnell.github.io/w3c-socialwg-activitystreams/activitystreams2.html#extension-round-trip
would change to
or could define prefix instead of using
@vocab
and prevent error prone hack with blank node label
_:bar
, especially when it gets used in aggregated streams which should NOT consider both bar properties as same one!http://jasnell.github.io/w3c-socialwg-activitystreams/activitystreams2.html#aggregation-of-extensions
I remember @sandhawke also expressing concern about AS2 use of
"@vocab": "_:"
hack!seeAlso: #108
The text was updated successfully, but these errors were encountered: