CentreForDigitalHumanities / CentreForDigitalHumanities/readit-interface
Maybe add back JSON-LD serialization at the backend
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
*See update below first.*
On 502e9b3, trying to visit `/ontology` in the browser leads to an uncaught exception. The stacktrace reveals that the rdflib-jsonld serializer is doing something complicated to determine whether the object of a triple is part of an `rdf:List` or not, which requires temporarily treating the object as a subject. This involves a deep path into django internals and querysets computed by rdflib-django3, finally ending up with the literal object being treated as a URI and throwing an exception.
rdflib-jsonld should probably only do this when the object of a triple is not a literal.
Somewhat related, is that a similar exception is thrown when you attempt to save a LiteralStatement in the Django admin. This might not be important enough to investigate, but is nonetheless an indication that some of the logic in rdflib-django3 is wrong, too.
As a temporary workaround, we render the backend APIs in Turtle instead of JSON-LD. This workaround was first tested with RDF/XML, which works too, but which is less convenient during development (Safari doesn't want to display the XML and Turtle is also more human-readable). A permanent solution should patch rdflib-jsonld and/or rdflib-django3 so that we can render JSON-LD as well.
Relevant to #81, #82, #84, #85, #88.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.