Serialize subject and predicate literals correctly#330
Serialize subject and predicate literals correctly#330joachimvh wants to merge 1 commit intordfjs:mainfrom
Conversation
I wonder if this has repercussions for #339; should we have a generic flag for "out of syntax features"? |
RubenVerborgh
left a comment
There was a problem hiding this comment.
Perhaps we should still keep _encodeSubject and _encodeObject around, just so we can error in those functions as needed.
...perhaps, though I worry about performance degradation doing it internally; we could just supply |
|
As an aside - are there any RDF syntaxes that don't support Line 207 in c7540c4 |
Turtle only allows it in the predicate position. |
3a8218a to
64a6ce0
Compare
Closes #329
This does have as disadvantage that invalid turtle will be generated if quads get added to the writer that can not be represented in turtle. If that is a problem, an alternative solution would be to have variants of the writer, similarly to how n-quads get handled, where the turtle version throws an error if it encounters a literal in the subject/predicate position and the N3 version handles it correctly. Let me know what you prefer and I can update the PR.