W3C home > Mailing lists > Public > public-linked-json@w3.org > July 2011

Re: About @type, @ and other tokens

From: Gregg Kellogg <gregg@kellogg-assoc.com>
Date: Sun, 10 Jul 2011 21:14:46 -0400
To: Manu Sporny <msporny@digitalbazaar.com>
CC: "public-linked-json@w3.org" <public-linked-json@w3.org>
Message-ID: <F999DFBA-4F8D-4BE2-A2B7-874932BAA606@kellogg-assoc.com>
On Jul 10, 2011, at 5:14 PM, Manu Sporny wrote:

On 07/08/2011 01:42 PM, Gregg Kellogg wrote:
With some minor processing rule changes, this could just use regular
@context term/prefix definitions.

{ "iri": "@source" ...}

I don't quite follow Gregg. Are you saying that the context would
declare that the @subject is the document's IRI if one wasn't specified
by the data file?

Basically, I'm taking a similar view to your previous post, although I think it's somewhat backwards. Adding a _reserved_ section doesn't really buy us anything. If what we're looking for is a way of aliasing the standard keywords to something an author might prefer, the standard prefix mechanism should work just fine. As I said, this might need a small change in the processing algorithm to perform in-scope term/prefix substitutions before doing keyword detection. Of course, you can't alias the first use of @context, but you could define different terms for @context in the default context (e.g., @profile).

If we assume that built-in keywords are @type, @context and @subject, then we could do the following:

{
  "@context": {
    "uri": "@subject",
    "a": "@type"
  }
}

This would allow usage such as the following:

{
  "@context": {
    "uri": "@subject",
    "a": "@type"
  },
  "uri": "http://subject/",
  "a": "http://schema.org/Person"
}

Basically, the @context processing would establish mappings for "uri" => "@subject", and "a" => "@type", and in the processing loop, then the key would be interpreted through this mapping and resolve to "@subject" and "@type" respectively.

Gregg

-- manu

--
Manu Sporny (skype: msporny, twitter: manusporny)
President/CEO - Digital Bazaar, Inc.
blog: PaySwarm Developer Tools and Demo Released
http://digitalbazaar.com/2011/05/05/payswarm-sandbox/
Received on Monday, 11 July 2011 01:15:25 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:53:17 UTC