linkeddata/rdflib.js — pull request #44 by chrysn (2014-06-23 17:08:27+00:00)
Title: add jsonld capabilities

this only works if the jsonld.js library[1] is included. no dedicated
parser is implemented, the work is delegated to that library, and a file
type handler takes care of converting jsonld.js' node format into rdflib
terms.

current caveats are:

* jsonld.js brings has to launch xmlhttprequests by itself
* there is content type handling code which i failed to trigger (see
FIXME comment)
* i didn't do test cases that involve the `why` part of statements, and
my literals tests were few too (barely enough to see datatypes are
terms but languages aren't)
* accept priorities were set arbitrarily
* no tests are implemented
* the dependency on jsonld.js is not declared, and no tests were done
without the library present.
* when using the widespread crossSiteProxyTemplate
`http://data.fm/proxy?uri={uri}`, be aware that json-ld does not seem
to work with it.

[1] https://github.com/digitalbazaar/jsonld.js