OpenGovLD / specs

Linked Data vocabulary and API for parliamentary and committee information systems
17 stars 1 forks source link

Rename "@id" to "id" ? #112

Open akuckartz opened 9 years ago

akuckartz commented 9 years ago

This was suggested by @msporny in https://github.com/json-ld/json-ld.org/pull/380#issuecomment-71382239 and https://github.com/json-ld/json-ld.org/pull/380#issuecomment-71392999

The other "@"-properties would be renamed as well.

akuckartz commented 9 years ago

At least one other editor of the JSON-LD specification opposes this suggestion. I therefore assign this to the same milestone as schema.org.

msporny commented 9 years ago

Link to the opposing viewpoint? I don't understand the reasoning. There is nothing harmful w/ setting an alias for new JSON-LD data. The "@" prefixed names are there purely for support of legacy data, so unless you have legacy data, there is no need to use them. Using '@' is an anti-pattern for non-legacy data.

akuckartz commented 9 years ago

@msporny There is one comment by @lanthaler

I thus think it is less confusing for users to simply stick to the standard and use those keywords. They will recognize them.. basically all blog posts, tutorials, presentations etc. that have been written use them. https://github.com/json-ld/json-ld.org/pull/380#issuecomment-71552461

A comment by @gkellogg who seems to agree with you:

But, when an application is expecting it, then aliasing keywords is often the right thing to do. And, for using with JavaScript .id is much more convenient than ["@id"]. https://github.com/schemaorg/schemaorg/issues/286#issuecomment-71424864

Two comments by @danbri

I am not aware of any major schema.org JSON-LD consumption actually using information from the @context file, so I'm wary of pushing such a change. Perhaps when/if JSON-LD consumer implementations mature this would be easier to roll out. For now I'm going to file this under "dim and distant future", although I appreciate that it has some aesthetic and practical appeal. https://github.com/schemaorg/schemaorg/issues/286#issuecomment-71467126

If any other major JSON-LD -using vocabularies are aliasing @id and @type, it would be good to hear about it here. https://github.com/schemaorg/schemaorg/issues/286#issuecomment-72003196

I think this issue requires further discussion in the broader JSON-LD community regarding best practice. The W3C Open Government Community Group then should act based on the results of that discussion.

akuckartz commented 8 years ago

In the last few days an almost unanymous consensus in the JSON-LD community has been formed to alias "@id" to "id" and "@type" to "type".