linkeddata / rdflib.js

Linked Data API for JavaScript
http://linkeddata.github.io/rdflib.js/doc/
Other
565 stars 143 forks source link

WIP: Fetching triples from a JSON-LD document #430

Closed angelo-v closed 4 years ago

angelo-v commented 4 years ago

I added a failing test for a problem I observed fetching data from JSON-LD documents. The PR does not include a fix yet. Reviews, if the test actually uncovers a bug that needs fixing are welcome. The same is true for ideas how to fix.

michielbdejong commented 4 years ago

This also makes NSS fail the content negotiation tests I'm adding in https://github.com/solid/solid-crud-tests/commit/9d4928b8abedb0f791b0f2a92a6a9a9e0d4eb774

michielbdejong commented 4 years ago

I'll see what I can do to try to fix this bug.

michielbdejong commented 4 years ago

Indeed it cannot find a JSON-LD handler, these are my debug statements from handlerForContentType:

handle response application/ld+json
checking pattern /application\/rdf\+xml/ null
checking pattern /application\/xhtml/ null
checking pattern /(text|application)\/(.*)xml/ null
checking pattern /text\/html/ null
checking pattern /text\/plain/ null
checking pattern /(application|text)\/(x-)?(rdf\+)?(n3|turtle)/ null
no handler
michielbdejong commented 4 years ago

Continued in https://github.com/linkeddata/rdflib.js/pull/439