-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serialize subject and predicate literals correctly #330
base: main
Are you sure you want to change the base?
Conversation
I wonder if this has repercussions for #339; should we have a generic flag for "out of syntax features"? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
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.