Skip to content
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

Incorrect JSON-LD: Missing '#' from the end of @vocab param in Core Example 2 #510

Open
1 of 5 tasks
TGNThump opened this issue Jul 19, 2020 · 4 comments
Open
1 of 5 tasks

Comments

@TGNThump
Copy link

Please Indicate One:

  • Editorial
  • Question
  • Feedback
  • Blocking Issue
  • Non-Blocking Issue

Please Describe the Issue:

https://www.w3.org/TR/activitystreams-core/#ex2-context should be

{
  "@context": {
     "@vocab": "https://www.w3.org/ns/activitystreams#",
     "ext": "https://canine-extension.example/terms/",
     "@language": "en"
  },
  "summary": "A note",
  "type": "Note",
  "content": "My dog has fleas.",
  "ext:nose": 0,
  "ext:smell": "terrible"
}

instead of

{
  "@context": {
     "@vocab": "https://www.w3.org/ns/activitystreams",
     "ext": "https://canine-extension.example/terms/",
     "@language": "en"
  },
  "summary": "A note",
  "type": "Note",
  "content": "My dog has fleas.",
  "ext:nose": 0,
  "ext:smell": "terrible"
}

as it does not expand correctly as JSON-LD without the # on the end of the @vocab context parameter.

TGNThump added a commit to TGNThump/ActivityStreams4J that referenced this issue Jul 19, 2020
@sebilasse
Copy link

Yes. Mentioned it recently in a socialhub discussion.
There seem to be some places in the spec. having the wrong namespace unfortunately.
Multiple examples (also 1 or 3) …

evanp added a commit that referenced this issue Aug 30, 2023
Per #510 , the `@vocab` value in example 2 is lacking a terminal #. This addition to the ERRATA.md specifies the correct value.
@evanp
Copy link
Collaborator

evanp commented Aug 30, 2023

Based on this conversation and review, I've made an update to the ERRATA.md to note that this vocab value is incorrect. Please comment further on this PR:

#545

@evanp
Copy link
Collaborator

evanp commented Sep 13, 2024

So this needs to be included in our ERRATA. I will bring it up for our next CG meeting.

@tesaguri
Copy link

545 is technically correct, but what is the point of example 2 in the first place?

I think the best practice is to just import the normative context, and I don't think there is reason not to do it, that at least justifies a dedicated example in the spec. The example seems to be carefully avoiding terms whose expanded term definitions are more than just an @id, but what if the document used, say, the id term? That would result in something like "as:id": "https://example.com/object", which wouldn't make sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants