RDFON: a new RDF serialization

I'm very happy for the encouragement from Sandro and Benjamin to push 
for an RDF 2.0. ;) I have several problems with RDF itself, but many 
more problems stem from one particular serialization: RDF/XML.

Let's face it---RDF is getting nowhere near the acceptance it should. 
Why? RDF/XML has much to blame. It's hard to understand and 
verbose---not to mention being unable to represent common RDF data 
easily. I almost got RDF into the Open eBook Publication Structure back 
in 2001 by simplifying the RDF/XML (see http://www.xpackage.org/story/ 
), but that fell through---RDF still seemed too difficult to understand, 
and RDF/XML just looks like a mess to the uninitiated. XML was a cool 
thing a decade ago (especially compared to SGML), and it still is fine 
for holding unstructured data such as marked-up text (e.g. HTML and 
Docbook), but it's beginning to get ragged along the edges when holding 
loosely structured data such as RDF.

One very active member in the Ajax community has indicated to me 
personally his disgust for RDF, but when it came down to it, the real 
problem for him was RDF/XML. Yet these same people in the Ajax community 
love something call JavaScript Object Notation (JSON)---a subset of 
JavaScript notation that can be evaluated directly within the language 
to create JavaScript structures. It's simple and almost 
self-explanatory. But it doesn't support RDF. Almost. But not quite.

So I will soon (once it's fully baked) propose a new serialization of 
RDF that closely resembles JSON. I call it RDFON, for RDF Object 
Notation. It handles single values and lists with ease, handles literals 
in lists with no problem, and is easy to understand. It's tiny. And it's 
even set to be compatible with RDF 2.0, once I get a chance to work on it.

So let's start with an example. Here's FOAF/VCard information in RDF/XML:

    <foaf:Person rdf:about="urn:uuid:ca00db92-0f7f-434b-b254-8a6afcf57907">
                <vcard:givenName>Mary Jane</vcard:givenName>
                <vcard:familyName rdf:parseType="Collection">
                    <rdf:Description rdf:value="Smith"/>
                    <rdf:Description rdf:value="Van Buren"/>
        <vcard:bday rdf:datatype="xsd:date">1980-01-01</vcard:bday>
        <eg:married rdf:datatype="xsd:boolean">true</eg:married>
        <eg:childCount rdf:datatype="xsd:integer">2</eg:childCount>
        <eg:custom rdf:datatype="eg:datatype">value</eg:custom>

Nasty stuff, huh? I even had to throw in some rdf:value properties to 
get multiple family name literals. Let's look at the same thing in RDFON:

            vcard.givenName:"Mary Jane",
            vcard.familyName:["Smith", "Van Buren"]

Isn't that beautiful?

Just so you know, I used a few RDFON shortcuts for xsd:date, 
xsd:boolean, and xsd:integer. Those could have been the equivalent full 


In my opinion, RDFON is a huge achievement. This could bring great 
simplicity to RDF serialization and aid understanding by the masses. And 
the Ajax community should jump on board, as it solves a few JSON 
problems (see http://www.nikhilk.net/DateSyntaxForJSON.aspx ) while 
bringing a whole lot of benefits. Maybe we could get it into ECMAScript. 
Basically, it's about the simplest thing you can get for RDF serialization.

I've been mulling this for years, but it only started to be fully gelled 
this morning. I'll put up an actual specification once it gels further.


Received on Thursday, 26 July 2007 21:11:51 UTC