Submitted by Mark Birbeck on Mon, 04/20/2009 - 09:21.
One of the features of our RDFa parser (Ubiquity RDFa) is the ability to import RDFa from external documents. This is particularly useful for bringing in definitions for templates and other processing rules that you would like to have applied to the document being parsed, or for importing one definition into another (owl:imports is implemented this way).
The technique used to garner these triples is simply to import the external document into a hidden iframe, and then run the parser on it. However, as the JavaScript programmers amongst you will know, that only gets you so far; if the document containing the RDFa you want to import comes from a different domain to the one that your source document originates from, most browsers won't give you access to the DOM in the iframe.
There are all sorts of ways to try to work around this, and a common one is to use a server to convert the RDFa to JSON, since script tags aren't victims of the cross-domain limitation. We therefore decided to create a JSON format that was as close as possible to RDFa. Of course, since RDFa itself is a serialisation of RDF, then really we were actually looking to create a JSON format for RDF.