linkeddata / rdflib.js

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

N3/Turtle parser should recognize rdf:first rdf:rest pairs as lists #571

Closed timbl closed 1 year ago

timbl commented 1 year ago

The turtle parser currently will accept the turtle list notation with parentheses, but will not accept lists in their reified from expressed as a set of lisp-like pairs off rdf:first and rdf:rest pairs ending with rdf:nil. It should convert them into lists as though they had been in the () syntax, and should remove then rdf:first and rdf:rest triples from the graph.

Probably good to make this an option, which happens by default.

See for example discission in https://github.com/CommunitySolidServer/CommunitySolidServer/issues/1438#issuecomment-1228282519