Open RinkeHoekstra opened 2 years ago
The following valid N-Quad does not contain a graph:
_:b0 <https://example.com/hasExampleProperty> "some literal value" .
This is correctly parsed into a $rdf.Store.
$rdf.Store
When iterating over the statement, the graph term looks something like:
{ "termType": "DefaultGraph", "value": "", "uri": "chrome:theSession" }
However, the atomicTermToN3 function in serializer.js does not deal with nodes of type DefaultGraph:
atomicTermToN3
serializer.js
DefaultGraph
https://github.com/linkeddata/rdflib.js/blob/c14dfd57d5159ad5ac1ee2523cc7924968e24f53/src/serializer.js#L522-L567
And fails with the error:
Error: Internal: atomicTermToN3 cannot handle DefaultGraph of termType: DefaultGraph
This should be fixed in atomicTermToN3 function in serializer.js by returning an empty string when the term type is DefaultGraph.
NB this is consistent also with how TriG represents default graphs.
The following valid N-Quad does not contain a graph:
This is correctly parsed into a
$rdf.Store
.When iterating over the statement, the graph term looks something like:
However, the
atomicTermToN3
function inserializer.js
does not deal with nodes of typeDefaultGraph
:https://github.com/linkeddata/rdflib.js/blob/c14dfd57d5159ad5ac1ee2523cc7924968e24f53/src/serializer.js#L522-L567
And fails with the error:
This should be fixed in
atomicTermToN3
function inserializer.js
by returning an empty string when the term type isDefaultGraph
.NB this is consistent also with how TriG represents default graphs.