W3C home > Mailing lists > Public > public-linked-json@w3.org > May 2015

setting default @vocab (or prefix) per property

From: ☮ elf Pavlik ☮ <perpetual-tripper@wwelves.org>
Date: Sat, 30 May 2015 12:11:56 +0200
Message-ID: <55698CEC.8050707@wwelves.org>
To: Linked JSON <public-linked-json@w3.org>
CC: James M Snell <jasnell@gmail.com>
Howdy,

Looking at some AS2.0 definitions, it might come useful to have
construct which sets a default @vocab (or prefix) for a particular
property. Especially for properties like:

*
http://jasnell.github.io/w3c-socialwg-activitystreams/activitystreams2-vocabulary.html#dfn-rel
*
http://jasnell.github.io/w3c-socialwg-activitystreams/activitystreams2-vocabulary.html#dfn-verb-term

Example - currently not possible in JSON-LD 1.0
http://tinyurl.com/o4q874l

{
  "@context": [
    "http://www.w3.org/ns/activitystreams",
    {
      "link": "as:link",
      "rel": {
        "@type": "@id",
        "@vocab": " http://www.iana.org/assignments/link-relations/"
      },
      "verb": {
        "@type": "@id",
        "@vocab": "https://w3id.org/verb/#"
      }
    }
  ],
  "@type": "Activity",
  "actor": "urn:example:person:martin",
  "object": "http://example.org/potato-soup",
  "verb": "cook",
  "link": [
    {
      "@type": "Link",
      "rel": "webmention",
      "href": "http://webmention.io/example.org"
    }
  ]
}

Feedback warmly welcomed :)

Cheers!
Received on Saturday, 30 May 2015 10:12:04 UTC

This archive was generated by hypermail 2.3.1 : Saturday, 30 May 2015 10:12:04 UTC