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

Compact URI speaks about "type" and "id" (not "@type" or "@id" as in JSON-LD documentation) #505

Open
4 tasks
jonassmedegaard opened this issue Nov 4, 2019 · 9 comments

Comments

@jonassmedegaard
Copy link

Please Indicate One:

  • [X ] Editorial
  • Question
  • Feedback
  • Blocking Issue
  • Non-Blocking Issue

Please Describe the Issue:

Section https://www.w3.org/TR/activitystreams-core/#compact-uris talks about using JSON-LD syntax involving "id" but https://www.w3.org/TR/json-ld/#compact-iris only talks about "@id", nowhere is "id" mentioned.

@jonassmedegaard
Copy link
Author

...and "type" should also be "@type" below the example, it seems.

@jonassmedegaard
Copy link
Author

...or rather, it seems that everywhere "type" should instead be "@type".

@nightpool
Copy link
Collaborator

If you look at the context document, you'll see that the type and id properties are defined as aliases of the @type and @id terms. Every JSON-LD library I've used has handled this aliasing correctly, so I don't think this is "bogus syntax"

@jonassmedegaard
Copy link
Author

@nightpool which context document?

Sorry if I phrased this too strongly. And even more sorry if this turns out to be only me needing education on how to read things.

@nightpool
Copy link
Collaborator

@jonassmedgaard if you look at the beginning of each JSON-LD document, you'll see a property that says "@context": "https://www.w3.org/ns/activitystreams". this is a link to the JSON-LD context document, where all other terms that appear in the document are defined. In particular, you'll see two definitions near the top of the file:

    "id": "@id",
    "type": "@type",

these tell you how to resolve the terms type and id when you see them in the document.

@jonassmedegaard jonassmedegaard changed the title Compact URI documents bogus JSON-LD syntax - "id" should be "@id" Compact URI speaks about "type" and "id" (not "@type" or "@id" as in JSON-LD documentation) Nov 4, 2019
@jonassmedegaard
Copy link
Author

Thanks, @nightpool - makes perfect sense now, and indeed was only an issue of my comprehension.

Closing as a non-bug.

@jonassmedegaard
Copy link
Author

Sorry no, I insist: It might be that ActivityStreams 2.0 generally rely on its @context defining id and @type but Example 29 in Figure 31 does not use ActivityStreams 2.0 context, and I also cannot see the following paragraphs implying an ActivityStreams 2.0 context either - seems pretty explicit to me that section 5.1 a.ka. https://www.w3.org/TR/activitystreams-core/#compact-uris is generally about JSON-LD and therefore should use the JSON-LD terms "@id" and "@type".

Specifically this sentence (my original reason for filing this issue) seem outright wrong to me:

In JSON-LD, Compact URI expansion of values applies to properties explicitly defined as "type": "id" in the @context definition.

I can only read that sentence as JSON-LD generally define a ned for type being id (not @id) which I fail to locate JSON-LD 1.0 specification stating anywhere - but I can locate it stating the opposite.

@nightpool
Copy link
Collaborator

nightpool commented Nov 4, 2019 via email

@evanp
Copy link
Collaborator

evanp commented Aug 30, 2023

I have made an update to the ERRATA to note this error. The PR is here:

#546

Please comment on the PR if you have further input.

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
@evanp @nightpool @jonassmedegaard and others