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

an idea: @context in coercion rules ?

From: Pierre-Antoine Champin <pierre-antoine.champin@liris.cnrs.fr>
Date: Wed, 11 Jul 2012 15:06:00 +0200
Message-ID: <CA+OuRR_C17dO8no1MgJemas2D_E_1gFRWsaC9-1U_H05Q4cEyw@mail.gmail.com>
To: public-linked-json@w3.org, public-rdf-wg@w3.org

an idea that came to me while reading the JSON-LD syntax document is one
could put a @context inside a coercion rule,
in order to change the meaning of a property depending on where it appears.

For example,

  "@context": {
    "name": "http://xmlns.com/foaf/0.1/name",
    "homepage": {
      "@id": "http://xmlns.com/foaf/0.1/homepage",
      "@type": "@id",
      "@context": {
        "name": "http://purl.org/dc/terms/title"
  "name": "Manu Sporny",
  "homepage": {
       "@id": "http://manu.sporny.org/",
       "name": "Manu's homepage"

would give the following triples

_:t0 <http://xmlns.com/foaf/0.1/name> "Manu Sporny" .
_:t0 <http://xmlns.com/foaf/0.1/homepage> <http://manu.sporny.org/> .
<http://manu.sporny.org/> <http://purl.org/dc/terms/title> "Manu's
homepage" .

where property name means foaf:name or dc:title depending on where it

Has this been discussed in the community group? Does this look like a valid
use case?

Received on Wednesday, 11 July 2012 13:06:32 UTC

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