-
Notifications
You must be signed in to change notification settings - Fork 63
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
JSON-LD Best Practice - Version JSON-LD Context files #442
Comments
Quick question, @msporny: isn't it redundant to have both
Otherwise, I would personally suggest to have one single namespace for both resources, set up with content negotiation; the two files are inter-dependent, it is legitimate to put them under the same namespace. What is your opinion on that? |
No, because you might do a bug fix in 2020 to the v1 context. I expect such an event would be rare, but there are some cases where this might happen.
Yes, that is correct... https://www.w3.org/2022/wot/td would provide a human readable vocabulary document, while https://www.w3.org/2022/wot/td/v1 would provide just the JSON-LD Context. Yes, you could do content negotiation, but we've found that many developers do a terrible job wrt. conneg and they either botch their implementations, or generate a ton of questions wrt. "I'm getting back text/html for the JSON-LD Context, what is going on!?" :) Does that answer all of your questions? |
@msporny I just wanted to ask you if your point is:
If so, maybe we can continue to use "https://www.w3.org/ns/td" as the basis What do you think? |
My personal take: When publishing updated context files, it’s a good idea to version these. However, when referencing them, I see little value in being able to reference a context file with or without e.g. some typo fixed. If the updated context file doesn’t break any existing referencing files, all referencing files should simply use the latest published context file. Of course, if the context file contains breaking changes, then referencing files need to explicitly opt-in. So, to me, it seems sufficient to have exactly one numeric part in the URI that is only incremented when referencing files shouldn’t be updated automatically to the latest version. |
@msporny @ektrah sorry maybe I was not clear enough. My point was how about using https://www.w3.org/ns/td/2019/v1 , etc. And another question of mine as well was we (=WoT WG) should also clarify how to use "2019" part and "v1" part to manage vocabulary changes and context changes :) |
https://www.w3.org/ns/td/2019/v1 looks fine to me, but for me it's not clear if it's compliant to W3C namespace policy |
If it is simpler to keep http://www.w3.org/ns/td, I would rather suggest the following:
In other words:
With that, we minimize both the amount of changes in the spec and possible ambiguity. |
Please no, let's not do this... the VCWG decided to use the structure below. The DID WG is expected to use the pattern below as well:
We spent a considerable amount of time exploring the right way to do this... and the proposals above are problematic (too verbose, under ns/* which leads to philosophical rabbit holes w/ Web Developers, exposing .jsonld extension when that's not necessary, unnecessary minor point versioning, etc.) Please use this pattern instead:
You have full backwards and forward compatibility with the approach above. |
I personally find the proposal satisfactory. Now, as you said, @msporny, it is probably better if developers figure out what is behind a URL just by looking at the URL. Yet, there is nothing saying So, why not |
We have found (through developer use of schema.org in the wild, as well as Verifiable Credentials) that developers copy-paste examples and don't often think about what they're copy-pasting. We've also found that most JSON developers don't care that it's a JSON-LD Context, they just view it as a declaration like an So adding 'context' doesn't add value to the vast majority of developers, and those that know about JSON-LD or implementation details, know what it is. |
We should define it just like @msporny recommends and close this chapter/Issue. |
We clarified this during the call with Ralph and PLH, @vcharpenay implemented the change accordingly, and it was merged. |
I'm doing a spotty review of the WoT TD spec here:
https://w3c.github.io/wot-thing-description/
A couple of comments on how to specify JSON-LD Context files and associated RDF Vocabularies under W3C space. The current spec contains this in the examples.
I suggest versioning the JSON-LD Context file so you have some control over future upgradability, so do this instead:
https://www.w3.org/2019/wot/td
https://www.w3.org/2019/wot/td/v1
This is what the Verifiable Claims WG is doing and is considered a best practice because:
https://www.w3.org/2022/wot/td
and a new JSON-LD Context at:https://www.w3.org/2022/wot/td/v2
.The text was updated successfully, but these errors were encountered: