[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:
   json2rdf_gsg(...)

or URIs + decentralized transformations:
   json2rdf_encoded_gsg2rdf_transformation_uri(...)
   json2rdf_encoded_gsg2rdf_transformation_service_uri(...)

Any thoughts?

Benji

--
Benjamin Nowack
http://bnode.org/


On 05.02.2008 19:31:57, Morten Høybye Frederiksen wrote:
>Hey,
>
>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
>identifiers).
>
>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:
>
>http://socialgraph.apis.google.com/lookup?q=www.wasab.dk/morten/&fme=1&pretty=1
>&sgn=1&callback=http________purl_org___net___jsongrddl___gsg
>
>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...
>
>Crazy?
>
>Morten
>
>[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
>http://lists.foaf-project.org/mailman/listinfo/foaf-dev
>



More information about the foaf-dev mailing list