- From: Markus Lanthaler <markus.lanthaler@gmx.net>
- Date: Thu, 12 Jan 2012 21:27:35 +0800
- To: "'Linked JSON'" <public-linked-json@w3.org>
I've just filed the following issue and would like to hear your opinion on it. ----- 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: _:c14n0 <data> _:c14n1, _:c14n2, _:c14n3. _:c14n1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> "http://xmlns.com/foaf/0.1/Person"; <http://xmlns.com/foaf/0.1/homepage> "http://example.com/bob/"; <http://xmlns.com/foaf/0.1/name> "Bob". _:c14n2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> "http://xmlns.com/foaf/0.1/Person"; <http://xmlns.com/foaf/0.1/homepage> "http://example.com/eve/"; <http://xmlns.com/foaf/0.1/name> "Eve". _:c14n3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> "http://xmlns.com/foaf/0.1/Person"; <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