W3C home > Mailing lists > Public > public-json-ld-wg@w3.org > June 2019

Re: Question about JSON-LD: @type in expanded term definitions in @context

From: Gregg Kellogg <gregg@greggkellogg.net>
Date: Mon, 10 Jun 2019 06:47:44 -0700
Cc: public-json-ld-wg@w3.org
Message-Id: <F29A99FB-958A-4A7D-B739-C37FB5B5B13C@greggkellogg.net>
To: Graham Klyne <gk@ninebynine.org>
On Jun 10, 2019, at 3:54 AM, Graham Klyne <gk@ninebynine.org> wrote:
> (I've just noticed that this mailing list is open to public comments, so I'm resending a question previously sent to semantic-web@w3.org)

Indeed, comments are welcome here. I had intended to reply to your email on semweb, but just now have returned from vacation.

> I'm working from the 1.0 version of the JSON-LD spec:
> https://www.w3.org/TR/json-ld/
> My question is this: does the inclusion of a "@type" value in an "expanded term
> definition" [1] in a JSON-LD context automatically mean that the defined term is a datatype property URI, and hence that the value of the "@type" key must be a datatype URI?

Other than for `@id`, `@vocab` and `null`, the value is interpreted as an IRI and is the datatype of any strings expanded using this term definition. JSON-LD makes no semantic requirement for what the IRI means.

> [1] https://www.w3.org/TR/json-ld/#dfn-expanded-term-definition
> I think the answer is "yes" (it's the usage illustrated for Typed Values [2]),
> but I'm struggling to find anything in the spec that definitively states this is the case).
> [2] https://www.w3.org/TR/json-ld/#typed-values
> ...
> In hindsight, I think the use of the same "@type" keyword for node types and
> value types maybe unfortunate, and what is leading to this uncertainty.  If I'm
> correct in my interpretation, the spec has clearly been misinterpreted by others (see below), and may benefit from some clarification in the 1.1 round.

In retrospect, yes, but changing it now would represent an incompatible change.

There is another issue (I can’t access right now) where we discussed the rationale for. To using this for item types and I believe text has been added supporting this. If not, it may go in the best practices or primer documents.


> More background on my question is at:
> https://github.com/LinkedPasts/linked-places/issues/11
> #g
> --
Received on Monday, 10 June 2019 13:48:17 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:15:26 UTC