-
Notifications
You must be signed in to change notification settings - Fork 16
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
remove @vocab and hydra prefix from JSON-LD context #17
Conversation
Reviewed 2 of 2 files at r1. src/DataModel/JsonLd/context.json, line 2 at r1 (raw file):
There's a trick which allows you to avoid having to use the full URL all the time. You can layer two contexts on top of each other; the second one just gets rid of the prefix:
Comments from Reviewable |
Review status: 1 of 2 files reviewed at latest revision, 1 unresolved discussion. src/DataModel/JsonLd/context.json, line 2 at r1 (raw file): Previously, lanthaler (Markus Lanthaler) wrote…
Done. Comments from Reviewable |
if no one objects, I'll merge this in the next couple of days Reviewed 1 of 1 files at r2. Comments from Reviewable |
As for the change - indeed it's a bit cleaner, but I was wondering whether changing an explicit declaration (which is a trick) with another trick that seems somehow difficult to understand is a good way. Review status: all files reviewed at latest revision, all discussions resolved, all commit checks successful. Comments from Reviewable |
To my understanding this context only gets used by JSON-LD hypermedia processor in framing the "hypermedia interface". Developers using the client only need to rely on that interface and don't need to know anything about this context and framing done internally to create the "hypermedia interface". Comments from Reviewable |
It can be used elsewhere, but it's a Review status: all files reviewed at latest revision, all discussions resolved, all commit checks successful. Comments from Reviewable |
Where are we with this? I'm fine with the current version in this PR or the one Pavlik had before that used absolute URLs everywhere without using the Review status: all files reviewed at latest revision, all discussions resolved, all commit checks successful. Comments from Reviewable |
I can live with both. I just understand what's going on with the former - the latter seems a bit more magical. Still, it's not worth of deliberating - there are bigger things ahead. Review status: all files reviewed at latest revision, all discussions resolved, all commit checks successful. Comments from Reviewable |
The latter is trivial as well once you know how JSON-LD processes contexts. It first evaluates the first array entry in Pavlik if you are fine with the current version in this PR I'll go ahead and merge it. If you prefer the other version, please revert the latest change and I'll merge that one instead. Thanks to both of you! Review status: all files reviewed at latest revision, all discussions resolved, all commit checks successful. Comments from Reviewable |
Review status: all files reviewed at latest revision, all discussions resolved, all commit checks successful. Comments from Reviewable |
In response to #15
Introduced changes ensure that framed content for
hypermedia
interface will always have full IRIs and not CURIEs withhydra:
prefix or plain terms from the hydra@vocab
.This assumes relying on
hydra
helper from namespaces module. At the same time I would like to understand better advantages of relying on that helper instead of keepinghydra:
prefix in JSON-LD context and rely on use of CURIEshydra.Collection
(helper) vs."hydra:Collection"
(CURIE)This change is