Is Idiomatic JSON for RDF Desirable?

The RDF Working Group seems to be making some useful progress in many areas. However, they are circling around the JSON serialisation a bit. Lee Feigenbaum asked on twitter:

#RDF WG #JSON task force -- should the group focus on RDF serializations in JSON, or bridging the worlds of (normal) JSON and RDF?

Here's what I wrote in email when David Wood asked my opinion on it a few weeks back:

I wouldn't underestimate the trivial use case that JSON is a convenient data format for parsing and most languages have extremely fast JSON parsers. It's certainly much simpler to parse than XML (only one character encoding). It's also extremely compact, with a low syntax to content ratio (unlike XML again). This is the use case the Talis RDF/JSON serialisation is targetted at.

The main problem I see with the "idiomatic JSON" use case is that although it's much more usable by the average web author, it's always going to butt up against various mismatches in model: graphs vs trees, URIs vs shortnames, literals/languages/datatypes vs strings, repeated properties vs simple values, blank nodes, lists/collections vs arrays/dictionaries.

The blunt truth is all of those things make RDF an unfriendly model to web authors and I think it will be very hard, or impossible, to develop an idiomatic JSON serialisation that web authors will care about.

I also tend to agree with Leigh Dodds that what we really want is a standardised Javascript API for RDF.

Note: The Talis RDF/JSON serialisation can now be found at http://docs.api.talis.com/platform-api/output-types/rdf-json. Redirect should be in place soon.

Permalink: http://blog.iandavis.com/2011/03/idiomatic-json/

Other posts tagged as json, linked-data, rdf, technology, w3c

Earlier Posts