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

RE: clarification/precision question on the JSON-LS syntax document

From: Markus Lanthaler <markus.lanthaler@gmx.net>
Date: Thu, 12 Jan 2012 20:29:08 +0800
To: "'Ivan Herman'" <ivan@w3.org>, "'Linked JSON'" <public-linked-json@w3.org>
Message-ID: <007b01ccd125$cb643940$622cabc0$@lanthaler@gmx.net>
Hi Ivan,

Yes this is, at least as of the current spec, correct. But admittedly it
looks weird. The first example is straightforward, the second one is a bit
trickier. I interpret it as follows:

The first "@id" after "something" specifies that an IRI follows but instead
of providing directly an array of IRIs an array of objects are provided.
Since all of these objects specify the subject, JSON-LD automatically
creates a link to those nodes, i.e., the IRI specified with "@id".

Thanks to your example I think I found a bug in the playground and a case
which is not properly documented in the spec. I create a separate mail for
that.



--
Markus Lanthaler
@markuslanthaler




> -----Original Message-----
> From: Ivan Herman [mailto:ivan@w3.org]
> Sent: Tuesday, January 10, 2012 10:15 PM
> To: Linked JSON
> Subject: clarification/precision question on the JSON-LS syntax
> document
> 
> Hi guys,
> 
> reading the Dec 27 version of the spec. My reading of it is that the
> following two JSON-LD fragments are semantically identical (from where
> I stand, for example, they would generate the same RDF triples):
> 
> {
>    "something" : [
>                     { "@id" : "http://www.ex1.org", "a" : "b" },
>                     { "@id" : "http://www.ex2.org", "c" : "d" }
>                  ],
>     ...
> }
> 
> and
> 
> {
>    "something" : { @id :
>                    [
>                       { "@id" : "http://www.ex1.org", "a" : "b" },
>                       { "@id" : "http://www.ex2.org", "c" : "d" }
>                    ]
>                  },
>     ...
> }
> 
> And the generated turtle in both cases is
> 
> [
>    <uri-for-something> <http://www.ex1.org>, <http://www.ex2.org> ;
>    ...
> ]
> 
> <http://www.ex1.org> "uri-for-a" "b" .
> <http://www.ex2.org> "uri-for-c" "d" .
> 
> First of all, is this correct? I deduce it from the fact that you use
> the "@id" : [...] idiom in the document, in one of the examples, to
> denote a number of top level, subjects.
> 
> However... how and where is that formally defined? Did I miss it, in
> which case my apologies? Or if it is not there, shouldn't it?
> 
> Cheers
> 
> Ivan
> 
> 
> 
> 
> 
> 
> 
> 
> ----
> Ivan Herman, W3C Semantic Web Activity Lead
> Home: http://www.w3.org/People/Ivan/
> mobile: +31-641044153
> FOAF: http://www.ivan-herman.net/foaf.rdf
> 
> 
> 
> 


Received on Thursday, 12 January 2012 15:16:37 GMT

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