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

Re: framing oddities on json-ld playground

From: Gregg Kellogg <gregg@greggkellogg.net>
Date: Sat, 30 Jun 2012 20:46:44 -0400
To: Kuno Woudt <kuno@frob.nl>
CC: Linked JSON <public-linked-json@w3.org>
Message-ID: <E97E9D11-F96C-4A32-B0AB-898F2BB9F6C5@greggkellogg.net>
On Jun 30, 2012, at 2:03 PM, Kuno Woudt wrote:

> Hi,
> 
> I've hit upon some surprising behaviour again with the json-ld 
> playground.  I understand all of that is still in development, but I am 
> still curious if the behaviour I'm seeing is correct, or if I've found a 
> bug, or if I'm just doing something stupid and my input is wrong :)
> 
> Here is my starting point:   http://ur1.ca/9leae
> 
> In this test document senet:properties is a "@list", I would like to see 
> it framed as a regular javascript array, so I add { "@container": 
> "@list" } to the context, my full context now looks like this:
> 
> {
>   "@context": {
>     "owl": "http://www.w3.org/2002/07/owl#",
>     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
>     "senet": "https://senet.org/ns#",
> 
>     "id": "@id",
>     "type": "@type",
>     "senet:properties": { "@container": "@list" }
>   }
> }
> 
> 
> This does change the "senet:properties" on "senet:Game" to render as a 
> javascript list, but the second object in the @graph suddenly has its id 
> changed from "senet:properties" to the full url, 
> "https://senet.org/ns#properties".

Looks like a bug to me. The term selection algorithm tries to make sure that the appropriate term is used, and if it's usage doesn't match it's definition, it will fall back on an absolute IRI. However, in this case, you're not using it as a property, but as an @id, which should be okay.

My implementation has the same issue, so it looks like a spec bug.

Gregg

> I wasn't expecting that to happen, is the behaviour correct?  Is there 
> something I need to add in the context to have this id stay compact?
> 
> -- kuno / warp.
> 
Received on Sunday, 1 July 2012 00:47:38 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:25:37 GMT