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

Re: JSON-LD terminology

From: Richard Cyganiak <richard@cyganiak.de>
Date: Mon, 27 Aug 2012 12:52:30 +0100
Cc: public-rdf-wg@w3.org
Message-Id: <DBB972E2-3A90-466E-A238-74AECA7789B6@cyganiak.de>
To: Andy Seaborne <andy.seaborne@epimorphics.com>
On 27 Aug 2012, at 11:42, Andy Seaborne wrote:
> I share your concern about the dangers of (what is perceived to be) a different data model.  I'm not so sure that it is as bad as you paint it though.
> 
> Looking at:
> 
>  http://www.w3.org/TR/json-ld-syntax/#linking-data
> 
> how would you change or tighten up the language in that section?

As I said in my email, I can see three reasonable approaches:

1. Conceptualise JSON-LD as an extension of JSON (that is, it allows identification and linking of JSON objects, and extends the JSON data model with some richer constructs. Vanilla JSON is a tree of JSON objects and JSON arrays. JSON-LD is a graph of JSON objects.)

2. Pick terms from RDF Concepts (that is, speak of “nodes” instead of “subjects and objects”, “literals” instead of “objects that are labelled with text”, “predicates” instead of “properties”)

3. Describe JSON-LD in terms of the claims it makes about the universe: Subject and objects are “resources”/“entities”/“things”. JSON-LD expresses “relationships” between them; “properties” are types of relationships. Strings, numbers and so on are “values”.

Given the goals of JSON-LD, the first seems most reasonable as it explains the benefits of using JSON-LD over vanilla JSON in terms that the target audience should already be familiar with and relate to. Personally, I think that the second is cleanest, but I suppose it would go a bit against the JSON-LD design goal of pretending that it has nothing to do with RDF.

> The doc does a reasonable job of saying "JSON Object" when it means a the concept from JSON - maybe there are some places it does not get the naming quite right (editorial).

Yes, the doc attempts to distinguish "JSON Object" and "object", but the target audience will be familiar with the term "object" in the vanilla JSON sense, so why go against the grain by re-defining "object" to mean something else? What's wrong with "node"?

> EricP - You are noted in "Issue 2" as suggesting "that the definitions of subject and object, while being practical, are at odds with [RDF-CONCEPTS] use in their roles within a triple."  Care to say more?

I guess EricP's concern is that in RDF Concepts, subjects and objects are positions in a triple. In the JSON-LD data model, subjects and objects are what RDF Concepts calls nodes. RDF Concepts doesn't distinguish between “subject nodes” and “object nodes”; there's just nodes. RDF Concepts does distinguish between IRIs, blank nodes, and literals, unlike JSON-LD.

> Personally, I have always found that the data model of RDF is not too complicated.  The main issue is the total amount of technology a web developer has juggle rather than any specific technology.
> 
> When faced with the task of learning RDF, the Turtle-as-records clicks.  URIs and prefix names can be a early confusion - JSON-LD does not change for the better or worse.

Uh, no. JSON-LD *does* change it for the worse. In Turtle, we have absolute URIs, relative URIs, and prefixed names. In JSON-LD, we have these three, plus term expansion. So there's four different ways of writing a URI.

> The other confusion is "what is a graph?" A graph is a set of nodes and a set of edges.  It can be drawn as a picture.  An RDF graph does not include an explicit set of nodes - it's just the edge set.  A node label can be an edge label.   This is again the same in JSON-LD and RDF Concepts.

Unlike RDF, JSON-LD allows literals as subjects and predicates, allows multiple nodes with the same IRI, doesn't allow string literals that happen to contain an IRI, and allows multiple identical edges (i.e. is a multiset of triples).

JSON-LD also doesn't specify whether IRIs are absolute or relative, doesn't say what exactly an internationalized string is, doesn't say what range of datatypes are supported, doesn't say whether graphs can be merged or how, and doesn't say when two graphs are identical; so in all of these regards its data model might also differ from RDF.

JSON-LD also contradicts itself regarding the possibility of unlabelled edges (not possible according to the definition, but possible according to a NOTE a bit later).

So I don't think it's the same data model. It's not just a difference in choice of words here and there.

(JSON-LD also contains a narrow definition of "Linked Data" that contradicts five years of existing W3C specifications, but that's another rant for another day.)

> RDF is not an RDF format!

Right, and neither are B.4 Microformats nor B.5 Microdata.

Best,
Richard
Received on Monday, 27 August 2012 11:53:03 UTC

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