dret / I-D

Internet Drafts I've authored or contributed to.
16 stars 13 forks source link

Fix/avoid outer linkset relations in JSON-LD #119

Closed stain closed 4 years ago

stain commented 5 years ago

https://gist.github.com/stain/4ae12d225b094246227740d7a93f0bde#file-linkset-ttl-L9 shows how the outer linkset from Figure 7 in http://signposting.org/linkset/#rfc.section.6.2 appears as a false link:

_:b0 <https://www.iana.org/assignments/link-relations/linkset> <https://example.com/links> .
_:b0 <https://www.iana.org/assignments/link-relations/linkset> <https://example.org/article/view/7507> .

(try "N-quads" rendering in http://json-ld.org/playground-dev/)

I think this is accidental as the outer linkset is used just to avoid having [] as upper object (which makes adding @context harder) - however it is correct to imply that the current document is (one of) the linksets of the described resources.

However this is wrong in a couple of ways:

I guess we do want to support using linkset in the inner objects - so we can redefine that. Should the outer key perhaps be @linkset (or similar reserved name) which we can map as a reverse key in JSON-LD context? It might also be possible to define the outer key to be ignored with @vocab only defined inside the nested object, not sure if that would need JSON-LD 1.1.

dret commented 5 years ago

On 2019-02-27 13:12, Stian Soiland-Reyes wrote:

:b0https://www.iana.org/assignments/link-relations/linkset https://example.com/links . :b0https://www.iana.org/assignments/link-relations/linkset https://example.org/article/view/7507 .

the linkset draft defines two serializations: native HTTP and JSON. if there is a problem with mapping the JSON via JSON-LD to RDF, that's not something the draft is concerned with, unless it is a problem of the JSON data itself.

i am not sure what kind of problem this is. if it is a problem with JSON, could you please frame the problem in a way that just discusses the JSON issue? thanks!

BigBlueHat commented 5 years ago

@stain left you a note on your gist: https://gist.github.com/stain/4ae12d225b094246227740d7a93f0bde#gistcomment-2860177

Essentially, this can be solved by adding "linkset": "@graph" to the JSON-LD context file shown in Appendix B

Would be good to have your confirmation on that, though, @stain. 😃

dret commented 4 years ago

addressed by new serialization.