W3C home > Mailing lists > Public > public-rdf-wg@w3.org > October 2012

Re: JSON-LD Data model / RDF Data Model differences

From: Gavin Carothers <gavin@carothers.name>
Date: Tue, 30 Oct 2012 12:28:30 -0700
Message-ID: <CAPqY83zCUuoO6hkHB688pBhbyE7yL70VQ6xARZbd=1Y3_Ncp8g@mail.gmail.com>
To: Gregg Kellogg <gregg@greggkellogg.net>
Cc: Manu Sporny <msporny@digitalbazaar.com>, RDF WG <public-rdf-wg@w3.org>
On Tue, Oct 30, 2012 at 11:44 AM, Gregg Kellogg <gregg@greggkellogg.net> wrote:
> On Oct 30, 2012, at 11:16 AM, Gavin Carothers <gavin@carothers.name> wrote:
>> On Tue, Oct 30, 2012 at 11:03 AM, Manu Sporny <msporny@digitalbazaar.com> wrote:
>>> We had a small side-discussion at the F2F meeting today about
>>> differences between lists in the JSON-LD data model and lists in the RDF
>>> data model. This devolved/evolved into a re-hash of the JSON-LD data
>>> model vs. the RDF data model discussion:
>>> http://www.w3.org/2011/rdf-wg/wiki/JSON-LD_Data_Model
>>> I was going to start by ranting about RDF lists, but it seems I already
>>> did that back in May:
>>> "I really hate RDF Lists"
>>> http://lists.w3.org/Archives/Public/public-rdf-wg/2012May/0098.html
>>> Not having Graph/Dataset Literal as a primitive in RDF is also harming
>>> the RDF data model. We should be able to place a graph/dataset literal
>>> in the object position of an RDF triple. I don't expect that this group
>>> will be able to resolve either issue, but I just thought I'd throw this
>>> out there so that some of you might understand what is lacking in the
>>> RDF data model.
>>> Resolving these two issues above would help align the JSON-LD data model
>>> with the RDF data model, specifically:
>>> 1. "Graph names can be blank nodes." The question of whether or not
>>>   graph names can be blank nodes would have to be answered. I'd argue
>>>   that you should be able to name graphs using blank nodes.
>> We did resolve this. Graph labels must be IRIs.
> Yes, we agreed to this.
>>> 2. "Lists are part of the data model." Lists are part of the data model
>>>   would be true for both models.
>>> 3. "Graphs/datasets are 'allowed' in the object position." Graphs would
>>>   be "allowed" in the object position in both models.
>> We did resolve this, we are not specifying graph literals nor dataset
>> literals at this time.
> Yes, my understanding that if an object defining a named graph is used as a property value of another object, what is asserted is that the name is an object, not the graph. E.g.:
> {
>   "@id": "foo",
>   "dc:title": "Foo",
>   "bar": {
>     "@id": "baz",
>     "@graph": {
>       "dc:title": "Baz"
>     }
>   }
> }
> says that there's a graph name "baz" with a single triple [] dc:title "Baz". The TriG should like the following:
> {<foo> dc:title "Foo"; <bar> <baz>.}
> <baz> {[dc:title "Baz"]}

My somewhat sad understanding is that "there's a graph name "baz" with
a single triple [] dc:title "Baz"." is one possible interpretation of
that TriG... but a reasonable one.

> Gregg
>>> We have simple answers to some of the other differences that would align
>>> the two data models.
>>> 1. "Unconnected nodes (IRIs, blank nodes or values) are supported." We
>>>   should add: "Authors SHOULD NOT use unconnected nodes (a node
>>>   definition that does not contain any properties) in JSON-LD
>>>   documents."
>>> 2. "Edge labels may be blank nodes." We should add: "Authors SHOULD
>>>   NOT use blank nodes as edge labels."
>>> 3. "Language tags are not normalized to lower case." We should add:
>>>   "JSON-LD processors MUST normalize all language tags to lowercase
>>>   when processing documents via the JSON-LD Algorithms."
>>> 4. "Scope of blank node labels". We should add: "Blank node labels are
>>>   scoped to the JSON-LD document."
>>> Which leaves these two differences between the JSON-LD data model and
>>> the RDF data model:
>>> 1. "Supports 'plain' strings, numbers and booleans, separately from
>>>   typed literals." This is true for TURTLE as well, so if there is a
>>>   problem with JSON-LD, then there is a problem with TURTLE when it
>>>   comes to this issue.
>>> 2. "Language maps are part of the data model." This is syntactic sugar
>>>   that was a requested "deal breaker" feature by the Drupal community.
>>>   If we don't include it, Drupal will willfully violate the JSON-LD
>>>   spec (or come up with their own solution). Digital Bazaar's
>>>   implementations will support Drupal by adding the feature to the
>>>   implementation, thus willfully violating the JSON-LD spec. The
>>>   difference in the data model does not result in any loss of
>>>   information when converting to RDF, other than the ability to
>>>   re-create the exact JSON-LD language-map structure when converting
>>>   back to JSON-LD from RDF. I personally don't think people will
>>>   care about not being able to round-trip language-maps from
>>>   JSON-LD to RDF and back to JSON-LD, but if they do, Gregg Kellogg
>>>   has proposed a mechanism that allows that to happen.
>>> Hope that is a helpful rundown of the differences between the two data
>>> models and my personal opinion of where we should be headed wrt. data
>>> model alignment.
>>> -- manu
>>> --
>>> Manu Sporny (skype: msporny, twitter: manusporny)
>>> President/CEO - Digital Bazaar, Inc.
>>> blog: HTML5 and RDFa 1.1
>>> http://manu.sporny.org/2012/html5-and-rdfa/
Received on Tuesday, 30 October 2012 19:28:59 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 22:02:08 UTC