Is this valid in #ActivityPub / AS2 ?
-
Is this valid in #ActivityPub / AS2 ?
{
"@context": "https://www.w3.org/ns/activitystreams",
...
"tag": [
{
"type": "Hashtag",
"name": "example",
"href": "https://example.com/tag/example"
}
}
Note that "Hashtag" is not a term in the normative AP/AS2 context. It seems to break linked data processing, but it also seems to pass the JSON-LD compaction requirements of AS2 (based on the JSON-LD Playground). If true, this means you can use extended types without extending the context. βοΈ -
thisismissem@hachyderm.ioreplied to steve@social.technoetic.com last edited by
@steve it is in the miscellaneous terms document.
-
steve@social.technoetic.comreplied to thisismissem@hachyderm.io last edited by
@thisismissem @julian I'm aware of the unofficial term, but that wasn't my point. That term is not included in the example document's JSON-LD context (normative or otherwise). It doesn't seem like a good practice although there's an example like this in the ActivityPub book. Mastodon uses Hashtag, but it includes the term in the extended JSON-LD context. It appears that one can include *any* undefined type (and other terms?) without them being in the context and it's technically allowed.
-
trwnh@mastodon.socialreplied to steve@social.technoetic.com last edited by trwnh@mastodon.social
@steve @thisismissem @julian this is due to
"@\vocab": "_:"
in the context document. it's a pre-JSON-LD 1.0 feature that got obsoleted by JSON-LD 1.0 and i think deprecated in JSON-LD 1.1?
https://www.w3.org/TR/json-ld11/#changes-from-cg and #h-note-0 and #h-note-41 say:
> The use of blank node identifiers to label properties is obsolete, and may be removed in a future version of JSON-LD, as is the support for generalized RDF Datasets.
https://www.w3.org/TR/rdf11-concepts/#dfn-blank-node-identifier
> Blank node identifiers begin with _: