W3C home > Mailing lists > Public > public-rdf-wg@w3.org > March 2011

Re: [JSON] PROPOSAL: Syntax structure should be object-based

From: Nathan <nathan@webr3.org>
Date: Thu, 17 Mar 2011 15:24:13 +0000
Message-ID: <4D82279D.4090106@webr3.org>
To: Yves Raimond <Yves.Raimond@bbc.co.uk>
CC: Andy Seaborne <andy.seaborne@epimorphics.com>, Manu Sporny <msporny@digitalbazaar.com>, RDF Working Group <public-rdf-wg@w3.org>
Yves Raimond wrote:
> On Thu, Mar 17, 2011 at 08:50:49AM +0000, Andy Seaborne wrote:
>>>> Sometimes it sounds more like "GRDDL for JSON".  The mapping isn't
>>>> universal - the generation of IRIs from data that has sufficiently
>>>> unique keys is application dependent, for example.
>>> Yes, the mapping can't be universal. However, not because the unique
>>> keys are application dependent (you can always specify a default
>>> vocabulary to map each unknown unique key to... you could even say that
>>> you could use bnodes as predicates here). In RDFa, these unique keys can
>>> be given a prefix via @vocab... RDF in JSON could have the same
>>> mechanism that basically states: "If you can't find a mapping for a key,
>>> append it to this URI." For example:
>>>
>>> {
>>>    "#": { "@vocab": "http://example.org/foo#" },
>>>    "sparqly": "Andy Seaborne",
>>> }
>>>
>>> The above would create the following triple:
>>>
>>> _:bnode1<http://example.org/foo#sparqly>  "Andy Seaborne" .
>> That was not the point of my example.  The keys here are in the
>> sense of database keys.  Subjects and objects need URIs for linking.
>>
>> If we have:
>>
>> {
>>   "employeeId":   "1234" ,
>>   "name"      :   "Alice"
>> }
>>
>> and want the URI to be <http://company.com/employee/1234> then the
>> "http://company.com/employee/" has to come from somewhere as does
>> the rule for concatenation.
>>
>> Maybe that happens by something "#" part
>>
>> { "#" : { "@gen": "http://company.com/employee/${name}", .. }
> 
> Or rather { "#" : { "@gen": "http://company.com/employee/${employeeId}", .. }
> 
> Anyway, a definite +1!

Likewise, and as per second half of:
   http://lists.w3.org/Archives/Public/public-rdf-wg/2011Feb/0086.html

Best,

Nathan
Received on Thursday, 17 March 2011 15:25:20 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:04:04 UTC