Re: Updated Editor's Draft of JSON-LD Syntax

On Jan 23, 2012, at 14:36 , Markus Lanthaler wrote:

> Sorry Ivan, but I think you slightly misunderstood what I'm proposing and
> confused it with what the current spec defines. Let me try to clarify it.
> 
> The current spec interprets the "data" property in the example in ISSUE-56
> as a relative IRI,

Correct

> therefore it creates that blank node with that <data>
> predicate leading to those extra triples.

Correct

> What I'm saying is that that is
> wrong IMO.
> 

Well... what is wrong? As you said, this is correct...


> We need a clear way to distinguish undefined terms from relative IRIs
> (that's the referenced ISSUE-49).

And we, in fact, already have a mechanism. This is the usage of predicates with a leading '@' which do have a special meaning. So we may be saying the same thing, in fact. Just as '@context' does not generate data for the output, but simply instructs the JSON-LD to do something special, so would '@data' instruct the processor to do something special. That is what I had in my mail.

Ie: we do not need any fundamentally new feature or behaviour. We have it, we just have to define the exact behaviour.

Maybe we are saying the same thing...

Ivan



> If have that, we could just ignore such
> properties which would allow us to serialize disjoint graphs. A parser would
> just recurse into the object (even though the term is not mapped to
> anything) and as soon as it is able to extract triples again, it would start
> a new, disjoint graph for those triples.
> 
> So the Turtle output from that JSON-LD document would be:
> 
> _:bnode1
>   <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
> "http://xmlns.com/foaf/0.1/Person";
>   <http://xmlns.com/foaf/0.1/homepage> "http://example.com/bob/";
>   <http://xmlns.com/foaf/0.1/name> "Bob".
> _:bnode2
>   <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
> "http://xmlns.com/foaf/0.1/Person";
>   <http://xmlns.com/foaf/0.1/homepage> "http://example.com/eve/";
>   <http://xmlns.com/foaf/0.1/name> "Eve".
> _:bnode3
>   <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
> "http://xmlns.com/foaf/0.1/Person";
>   <http://xmlns.com/foaf/0.1/homepage> "http://example.com/manu/";
>   <http://xmlns.com/foaf/0.1/name> "Manu".
> 
> Which is exactly what we need IMO. This would also allow author to mix
> "semantic JSON" with plain old JSON.
> 
> 
> I will add this discussion to the ticket to keep track there as I think this
> important for the outcome of that issue.
> 
> 
> --
> Markus Lanthaler
> @markuslanthaler
> 
> 
> 
> 
>> -----Original Message-----
>> From: Ivan Herman [mailto:ivan@w3.org]
>> Sent: Monday, January 23, 2012 9:13 PM
>> To: Markus Lanthaler
>> Cc: 'Linked JSON'
>> Subject: Re: Updated Editor's Draft of JSON-LD Syntax
>> 
>> Markus,
>> 
>> I am sorry but... I am not convinced by your proposal. I do not see the
>> real added value of the extra triples you generate, while it is not
>> clear what the role is. From a purely RDF point of view, it is an
>> arbitrary choice of three subjects that you pull from the dataset and
>> declare as <data> but that is not really meaningful when we are talking
>> about a graph and not a tree or a forest. And RDF is a general Graph.
>> If one forgets about the RDF relation of JSON-LS, then again it is
>> misleading to an author to suddenly see a property that has a special,
>> predefined meaning, while all other JSON-LD specific processing
>> predicates are of the "@..." class (and are not used to
>> generate/represent data).
>> 
>> My preferred approach would be very close to the current idiom, just to
>> separate it from the usage "@id" because I find that it currently
>> overloads semantics. While you guys have reduced the number of "@..."
>> predicates whenever the meaning was similar (e.g., "@type") and I agree
>> with that, this case is different; I think this is where a separate,
>> dedicated "@..." is necessary. Something like:
>> 
>> {
>>  "@context" : { .... },
>>  "@data" : [
>>     ....
>>   ]
>> }
>> 
>> What this would mean is that, _formally_, the pattern above is the
>> general format of JSON data. That seems to be fairly clear,
>> semantically. Additionally, the JSON-LD syntax would allow for fairly
>> obvious shorthands, namely:
>> 
>> {
>>  "@context" : { .... },
>>  "@data" : { "@id" : "http://blabla" ... }
>> }
>> 
>> which is equivalent to:
>> 
>> {
>>  "@context" : { .... },
>>  "@data" : [ { "@id" : "http://blabla" ... } ]
>> }
>> 
>> and
>> 
>> {
>>   "@context" : { ... },
>>   "@id" : "http://blabla",
>>   ... other statements ...
>> }
>> 
>> is equivalent to
>> 
>> {
>>   "@context" : { ... },
>>   "@data" : {
>>      "@id" : "http://blabla",
>>      ... other statements ...
>>   }
>> }
>> 
>> Some fall back rules are necessary if the author has
>> 
>> {
>>   "@context" : { ... },
>>   "@id" : "http://blabla",
>>   ... other statements ...
>>   "@data" [ ... }
>> }
>> 
>> probably merging the @data section with a new object defined by the
>> rest.
>> 
>> This means that by, again, _formally_ we have a clean definition, we
>> also get the simplicity of today for the usual cases, while covering a
>> missing, albeit necessary, functionality...
>> 
>> My 2 cents...
>> 
>> Ivan
>> 
>> 
>> 
>> 
>> 
>> 
>> On Jan 23, 2012, at 13:36 , Markus Lanthaler wrote:
>> 
>>> Oh OK.. Could you have a look at ISSUE-56 and check if what I
>> proposed there
>>> would be a viable solution for this idiom?
>>> 
>>> https://github.com/json-ld/json-ld.org/issues/56
>>> 
>>> IMO that would be a viable (and clean) solution for this.
>>> 
>>> 
>>> --
>>> Markus Lanthaler
>>> @markuslanthaler
>>> 
>>> 
>>> 
>>> 
>>>> -----Original Message-----
>>>> From: Ivan Herman [mailto:ivan@w3.org]
>>>> Sent: Monday, January 23, 2012 8:03 PM
>>>> To: Markus Lanthaler
>>>> Cc: 'Manu Sporny'; 'Linked JSON'
>>>> Subject: Re: Updated Editor's Draft of JSON-LD Syntax
>>>> 
>>>> Markus,
>>>> 
>>>> unfortunately, I have a conflicting call...
>>>> 
>>>> Ivan
>>>> 
>>>> On Jan 23, 2012, at 12:16 , Markus Lanthaler wrote:
>>>> 
>>>>> Hi Ivan,
>>>>> 
>>>>> I agree.. that's an important concept to talk about. We have a
>>>> telecon
>>>>> scheduled for tomorrow at 15:00 UTC. Since Manu didn't send the
>>>> agenda out
>>>>> yet I would suggest we discuss it tomorrow - if you have time to
>> join
>>>> the
>>>>> telecon!?
>>>>> 
>>>>> 
>>>>> 
>>>>> --
>>>>> Markus Lanthaler
>>>>> @markuslanthaler
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>>> -----Original Message-----
>>>>>> From: Ivan Herman [mailto:ivan@w3.org]
>>>>>> Sent: Monday, January 23, 2012 5:39 PM
>>>>>> To: Manu Sporny
>>>>>> Cc: Linked JSON
>>>>>> Subject: Re: Updated Editor's Draft of JSON-LD Syntax
>>>>>> 
>>>>>> Manu,
>>>>>> 
>>>>>> I know I sound like a broken record. But the
>>>>>> 
>>>>>> {
>>>>>> "@id" : [
>>>>>>   { ... }
>>>>>>   { ... }
>>>>>> ]
>>>>>> }
>>>>>> 
>>>>>> idiom is still not defined anywhere and it just pops up from
>> nowhere
>>>> in
>>>>>> section A.2. I do not believe that the syntax and semantics in
>> that
>>>>>> example can be derived from any of the previous sections.
>>>>>> 
>>>>>> 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
>> 
>> 
>> 
>> 
> 


----
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 Monday, 23 January 2012 13:51:13 UTC