[foaf-dev] GRDDL and JSON

Benjamin Nowack bnowack at semsol.com
Wed Feb 6 09:42:05 GMT 2008

I like the idea. I'm not sure how the transformation mechanism
should work, though. Portable/executable transformations (à la
GRDDL), or dedicated parsers, or transformation services where
you pass the json data to?

Either way I'd vote for a simple agreed on "this is rdfizable json"
identifier as the callback prefix. This could simplify format 
detection a bit. As a 2nd callback "hook" we'd need a 
format-specific identifier or transformation service URI (depending
on how the mechanism is supposed to work), e.g.
short identifiers + a centralized transformation registry:

or URIs + decentralized transformations:

Any thoughts?


Benjamin Nowack

On 05.02.2008 19:31:57, Morten Høybye Frederiksen wrote:
>Thinking out loud...
>* GRDDL [1] can extract triples from xml and html documents only.
>* JSON isn't as precise as RDF because of the lack of URIs, and no
>universal way to interprete results.
>* No obvious way to include "interpretation" information in JSON.
>* Some JSON APIs, e.g. GSG [2] can return results in a callback wrapper.
>* Results from GSG can be turned into triples [3].
>So, how about using the callback functionality to add GRDDL-like
>functionality to e.g. the results returned from GSG?
>Assuming an algorithm for turning a valid JSON callback into a URI
>(that doesn't contain underscores):
>* Replace three consecutive underscores with a "/" (slash)
>* Then replace two consecutive underscores with a ":" (colon)
>* Then replace remaining underscores with a "." (dot)
>Define a base URI, e.g. "http://purl.org/net/jsongrddl/", and append
>som identifier, e.g. "gsg" (assuming some sort of central registry for
>Add a callback argument to the JSON API request, and the result could
>then -- with a little initial effort -- be interpreted as triples by
>any RDF library (that already supports GRDDL-like functionality) by
>keying of the (prefix of) the callback:
>Not sure which mapping to use for GSG, with the wrong results
>(currently) returned by the above query, I'm not inclined to much more
>than rdfs:seeAlso statements...
>[1] http://www.w3.org/2003/g/data-view
>[2] http://code.google.com/apis/socialgraph/
>[3] http://chatlogs.planetrdf.com/swig/2008-02-02.html#T00-47-59
>foaf-dev mailing list
>foaf-dev at lists.foaf-project.org

More information about the foaf-dev mailing list