- From: Jindřich Mynarz <mynarzjindrich@gmail.com>
- Date: Thu, 17 Dec 2015 11:04:04 +0100
- To: public-linked-json@w3.org
- Message-ID: <CAE=8Bu-b8+eAPG36SgdHy41ifqY6GPZuEx9DGrtctqTYijT=gQ@mail.gmail.com>
Hi, I found that some services return JSON-LD, in which IRIs are serialized as literals. For example, consider the following example: { "@id": "http://mynarz.net/#jindrich", "http://xmlns.com/foaf/0.1/knows": [ "http://ruben.verborgh.org/#me", "http://richard.cyganiak.de/foaf.rdf#cygri" ] } The objects of foaf:knows are serialized as literals, even though they are IRIs. Now, if I want to recover the objects of foaf:knows as IRIs, the following context is of no use: { "@context": { "foaf": "http://xmlns.com/foaf/0.1/", "foaf:knows": {"@type": "@id"} } } The definition of foaf:knows in this way doesn't match the input JSON-LD, which ends up compacted as: { "@context": { "foaf": "http://xmlns.com/foaf/0.1/", "foaf:knows": { "@type": "@id" } }, "@id": "http://mynarz.net/#jindrich", "http://xmlns.com/foaf/0.1/knows": [ "http://ruben.verborgh.org/#me", "http://richard.cyganiak.de/foaf.rdf#cygri" ] } I.e. not even the foaf namespace prefix is used. JSON-LD Framing gives the same result. Is it possible to use a JSON-LD context or frame to *coerce* literal objects to IRIs? Best, Jindřich -- Jindřich Mynarz http://mynarz.net/#jindrich
Received on Thursday, 17 December 2015 10:04:52 UTC