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

JSON-LD context relation #45

Closed
philarcher opened this issue Aug 17, 2021 · 13 comments
Closed

JSON-LD context relation #45

philarcher opened this issue Aug 17, 2021 · 13 comments

Comments

@philarcher
Copy link

Mark's final comment https://mailarchive.ietf.org/arch/msg/httpapi/gv9uqyD8Fv96P-_ip9LWIiCqALM/ is

The link relation type of http://www.w3.org/ns/json-ld#context is defined in W3C's JSON-LD 1.1 spec so it's out of our control here. See https://www.w3.org/TR/json-ld/#interpreting-json-as-json-ld. I wasn't involved in this work so I can't comment on why it's http and not https. Gregg Kellogg would know.

@hvdsomp
Copy link
Collaborator

hvdsomp commented Sep 21, 2021

We don't feel liking re-opening the can of worms of whether it should or should not be possible to use the IANA-registered link relation types as URIs for use in semantic web applications.

The proposal is:

  • To use an example that does not include IANA-registered links relation types and hence does not need the https://www.iana.org/assignments/relation/ in the JSON context.
  • To use as the example a JSON linkset document and JSON context from @philarcher's GS1 application since no IANA-registered links are used in those link sets as per https://www.gs1.org/voc/?show=linktypes. We will get in touch with Phil about this.

@mnot, please let us know if not OK.

@azaroth42
Copy link

It's http in JSON-LD 1.1 because we inherited it from JSON-LD 1.0. Manu Sporny might recall if there was discussion about http/https at that point, not sure that it's especially relevant to this work however.

@mnot
Copy link
Member

mnot commented Sep 23, 2021

Ah - if it's defined by JSON-LD, not this spec, never mind. Using IANA URLs without consulting IANA is pretty naughty of JSON-LD, though...

@dret
Copy link
Collaborator

dret commented Sep 23, 2021 via email

@azaroth42
Copy link

Err, to clarify which URI I was talking about http://www.w3.org/ns/json-ld#context is from JSON-LD 1.0 and continued in 1.1.
I think the proposal to avoid the IANA relations in the JSON-LD context appendix is the easiest route, per @hvdsomp and @dret.

@hvdsomp
Copy link
Collaborator

hvdsomp commented Sep 23, 2021

I'd like to add a clarification:

  • The IANA URI http://www.iana.org/assignments/relation/ is in no way used/introduced in any JSON-LD specification
  • I take full responsibility for having abused it in the JSON-LD example of Appendix A

As proposed above, in order to avoid using the IANA URI http://www.iana.org/assignments/relation/, the JSON-LD example of Appendix A will be replaced by one that does not rely on IANA-registered link relation types.

Having said that, I do want to express that I find it very regrettable that no mechanism exists to express IANA-registered link relation types as HTTP URIs. Having such a mechanism would be beneficial for interoperability between semantic and non-semantic applications. Direct results of not having such a mechanism:

  • JSON link set will only be expressible as JSON-LD link sets if the JSON link set only uses link relation types that are not registered by IANA.
  • Basic link relation types, such as first, last, prev, next, will continue to be redefined as HTTP URIs in semantic ontologies as happened recently again in the W3C DCAT v3 specification, see e.g. https://www.w3.org/TR/vocab-dcat-3/#Property:resource_first

@azaroth42
Copy link

And in elsewhere in the W3C context, ActivityStreams also mapped 5988 links into its ontology: https://www.w3.org/TR/activitystreams-core/#link

@philarcher
Copy link
Author

I'll discuss an example Linkset and context file with @hvdsomp and @dret offline. The example in my little Linkset visualization library demo at https://gs1.github.io/linkset/ is probably the best one I have to hand. It deliberately uses various features of Linkset. However, things like our link rel types of gs1:defaultLink and gs1:defaultLinkMulti are probably ones you don't want in this example but they can easily be stripped out.

I'm working to get our JSON-LD context file in place in its permanent URI - something that is proving more difficult than you'd imagine. It doesn't create URIs out of IANA link relations but I'm with @hvdsomp - it's a shame the situation is as it is on this one. Our link relations types are explicitly defined as RDF properties precisely so that our resolver service and its Linksets form a Linked Data node. Anyway, that's by the by...

@phochste
Copy link

The ActivityStreams link example 14 indeed adds more reasons why work on a JSON-LD context file is really needed. See also the Playground version of the string literals popping up in the resulting graph https://tinyurl.com/4r7jm4b3

hvdsomp added a commit that referenced this issue Oct 5, 2021
Reworked Appendix A with a new example that does not leverage IANA-registered link relation types as per the discussion in #45. Also adding the JSON-LD 1.1 solution to the problem of not being able to use "linkset" links in link sets when mapping to JSON-LD as provided by @azaroth42 in #47. Unfortunately, as things stand with not being able to express IANA-registered link relation types as HTTP URIs (see also #45) it will not be possible to use "linkset" links (or any other IANA-registered link types) in link sets that need to be mapped to JSON-LD until a solution is found with that regard.
@hvdsomp
Copy link
Collaborator

hvdsomp commented Oct 5, 2021

Addressed in 0838136

@philarcher
Copy link
Author

Is everyone else happy with the revised version on this issue? (I am)

@hvdsomp
Copy link
Collaborator

hvdsomp commented Oct 6, 2021

For completeness of this thread, I want to add that the issue with expressing IANA-registered link relation types as HTTP URIs was also discussed in mnot/I-D#140 and would likely also pop up in relation to protocol-registries/link-relations#25

@hvdsomp
Copy link
Collaborator

hvdsomp commented Oct 7, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants