- From: Markus Lanthaler <markus.lanthaler@gmx.net>
- Date: Tue, 10 Jan 2012 19:32:56 +0800
- To: <public-linked-json@w3.org>
Sorry, my bad, I was setting @iri instead of doing aliasing @id but that brought me to an interesting question: If we alias keywords, should the alias be used for compaction and expansion be used or not? So in this case, if I alias @id to @iri should the output contain @id or @iri? Also, if I alias @id expansion produces some strange outputs in the playground when @id is used in the JSON-LD document (it nests an @id within @id, http://bit.ly/zKljJE): { "@id": { "@id": "#me" }, "http://xmlns.com/foaf/0.1/knows": [{ "@id": { "@id": "http://example/bob#me" }, "http://xmlns.com/foaf/0.1/name": "Bob", "http://xmlns.com/foaf/0.1/homepage": { "@id": "http://example.com/bob" } }, { "@id": "http://www.markus-lanthaler.com/#me", "http://xmlns.com/foaf/0.1/name": "Markus", "http://xmlns.com/foaf/0.1/homepage": { "@id": "http://www.markus-lanthaler.com/" } }] } "@id": "http://www.markus-lanthaler.com/#me" is correct as I used @iri in the input document. -- Markus Lanthaler @markuslanthaler > -----Original Message----- > From: Markus Lanthaler [mailto:markus.lanthaler@gmx.net] > Sent: Tuesday, January 10, 2012 7:19 PM > To: public-linked-json@w3.org > Subject: Aliasing @id creates results in typed literals for IRIs > > Hi, > > I not sure if this is an issue or a desired behavior - at least it's > not > wrong. When I alias @id to, e.g. @iri in the JSON-LD playground @id > gets > replaced with @iri as expected when used to define the subject, but it > yields to a typed literal for objects. See example below > (http://bit.ly/x1Qmfy): > > { > "@iri": "#me", > "http://xmlns.com/foaf/0.1/knows": [{ > "@iri": "http://example/bob#me", > "http://xmlns.com/foaf/0.1/name": "Bob", > "http://xmlns.com/foaf/0.1/homepage": { > "@type": "@iri", > "@literal": "http://example.com/bob" > } > }, { > "@iri": "http://www.markus-lanthaler.com/#me", > "http://xmlns.com/foaf/0.1/name": "Markus", > "http://xmlns.com/foaf/0.1/homepage": { > "@type": "@iri", > "@literal": "http://www.markus-lanthaler.com/" > } > }] > } > > > -- > Markus Lanthaler > @markuslanthaler
Received on Tuesday, 10 January 2012 11:33:32 UTC