Skip to content

Relax the colliding keywords constraint for @type #4

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

Closed
gkellogg opened this issue Jul 8, 2018 · 6 comments
Closed

Relax the colliding keywords constraint for @type #4

gkellogg opened this issue Jul 8, 2018 · 6 comments
Labels
wontfix This will not be worked on

Comments

@gkellogg
Copy link
Member

gkellogg commented Jul 8, 2018

I want the following:

{
  "@context": {
    "type": "@type",
    "profile": "@type"
  },
  "type": "cov:Coverage",
  "profile": "cov:GridCoverage"
}

However this is not allowed. The playground says "Invalid JSON-LD syntax; colliding keywords detected".

However, this one works:

{
  "@context": {
    "type": {"@id": "rdf:type", "@type": "@id" },
    "profile": {"@id": "rdf:type", "@type": "@id" }
  },
  "type": "cov:Coverage",
  "profile": "cov:GridCoverage"
}

I understand that this restriction probably makes sense for other keywords, but could it do any harm for @type?

Original issue Relax the colliding keywords constraint for @type #402.

@dlongley
Copy link
Contributor

I don't know of any reason why this wouldn't work for @type but maybe someone else does. I wouldn't object to loosening the restriction for @type if people think there is a significant need for this.

@ajs6f
Copy link
Member

ajs6f commented Aug 10, 2018

I'm probably just expressing my ignorance of the history here, but why was this restriction instituted? It's not obvious to me (yet) what's being guarded against...

@gkellogg
Copy link
Member Author

There was discussion in the 1.0 timeframe here, with related issues json-ld/json-ld.org#91 and json-ld/json-ld.org#102. These were getting a slightly different issues, but worth the read to go over the history of the subject.

@ajs6f
Copy link
Member

ajs6f commented Aug 10, 2018

Thanks @gkellogg, I'll read up and get educated!

@azaroth42
Copy link
Contributor

Resolution on WG call of 2018-08-17: We propose using scoped contexts rather than multiple top level aliases for @type. Next step is to determine if that meets the original use case or not.

@gkellogg gkellogg added the defer-future-version Defer this issue until a future version of JSON-LD label Nov 28, 2018
@iherman iherman mentioned this issue Jan 12, 2019
@azaroth42 azaroth42 added propose closing and removed defer-future-version Defer this issue until a future version of JSON-LD labels Feb 8, 2019
@iherman
Copy link
Member

iherman commented Feb 9, 2019

This issue was discussed in a meeting.

  • RESOLVED: Close api#4 wontfix, use case is covered with scoped contexts, and no other known use cases to justify the complexity {: #resolution10 .resolution}
View the transcript Relax the colliding keywords constraint for @type
Rob Sanderson: ref: #4
Gregg Kellogg: there is no identified use case for this
Rob Sanderson: the complications outweigh any benefit
Proposed resolution: Close api#4 wontfix, use case is covered with scoped contexts, and no other known use cases to justify the complexity (Rob Sanderson)
Gregg Kellogg: +1
Ivan Herman: +1
Rob Sanderson: +1
Jeff Mixter: +1
Adam Soroka: +!
Harold Solbrig: +1
Benjamin Young: +1
Simon Steyskal: +1
David I. Lehn: +1
David Newbury: +1
Resolution #10: Close api#4 wontfix, use case is covered with scoped contexts, and no other known use cases to justify the complexity {: #resolution10 .resolution}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

5 participants