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

Specify how terms are treated when they are not specified in the context (ISSUE-56)

From: Markus Lanthaler <markus.lanthaler@gmx.net>
Date: Thu, 12 Jan 2012 21:27:35 +0800
To: "'Linked JSON'" <public-linked-json@w3.org>
Message-ID: <00d901ccd12d$f4ee6760$decb3620$@lanthaler@gmx.net>
I've just filed the following issue and would like to hear your opinion on


The syntax spec currently says that [1]: 

"JSON-LD defines a mechanism to map JSON terms, i.e., keys and values, to
IRIs. This does not mean that JSON-LD requires every key or value to be an
IRI, but rather ensures that keys and values can be mapped to IRIs if the
developer desires to transform their data into Linked Data."

And I think it is a design decision that we allow mixing plain old JSON with
linked JSON. Nevertheless, according to the API spec a key is *always*
converted to an IRI even if that means to interpret the value directly as an
IRI. For example the following JSON-LD document:

      "@context": { "foaf": "http://xmlns.com/foaf/0.1/" },
      "data": [
          "@id": "_:bnode1",
          "@type": "foaf:Person",
          "foaf:homepage": "http://example.com/bob/",
          "foaf:name": "Bob"
          "@id": "_:bnode2",
          "@type": "foaf:Person",
          "foaf:homepage": "http://example.com/eve/",
          "foaf:name": "Eve"
          "@id": "_:bnode3",
          "@type": "foaf:Person",
          "foaf:homepage": "http://example.com/manu/",
          "foaf:name": "Manu"

where "data" was intentionally not mapped to an IRI is translated to the
following Turtle document:

       <http://xmlns.com/foaf/0.1/homepage> "http://example.com/bob/";
       <http://xmlns.com/foaf/0.1/name> "Bob".
       <http://xmlns.com/foaf/0.1/homepage> "http://example.com/eve/";
       <http://xmlns.com/foaf/0.1/name> "Eve".
       <http://xmlns.com/foaf/0.1/homepage> "http://example.com/manu/";
       <http://xmlns.com/foaf/0.1/name> "Manu". 


[1] http://json-ld.org/spec/latest/json-ld-syntax/#linking-data
Received on Thursday, 12 January 2012 13:28:21 UTC

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