Fix use native types flag with non-native values#671
Conversation
|
Unless there is a better idea for refactoring the spec algorithm in this place (see #670), I'll probably implement the fix similarly to how I'll fix it in TRLD: niklasl/trld@a66feee (i.e. add a |
|
I made a possibly cleaner approach in niklasl/trld@5fe0981 (explained in that commit message). Any feedback welcome; I'll probably proceed with fixing the spec algorithm accordingly in the coming week. |
5185051 to
ad93494
Compare
|
I've now implemented what I see as an acceptable fix, both in TRLD: niklasl/trld#5 (which now passes all fromRdf tests including the one added in this PR); and as a proposed spec change in this PR. It is a slight refactoring of the RDF to Object Conversion algorithm, to address this issue whilst also keeping or seeking to improve the clarify of the algorithm. |
8e1a6c7 to
f028c25
Compare
|
This was discussed during the #json-ld meeting on 24 June 2026. View the transcriptPull Request 671 Fix use native types flag with non-native values (by niklasl) [needs discussion]niklasl: this issue has been around forevever; I think that implementations do not follow the spec (they would encounter issues), bigbluehat: I agree on the separate PR for the change on the "quote" thing <Zakim> pchampin, you wanted to react to anatoly-scherbakov pchampin: the CI issue is due to an problem I created with common files, <gb> Pull Request 693 fix bug in Rakefile after removing common/ (by pchampin) |
|
Oh my, the github bug that changes newline form struck again. (It seems to occur, sometimes, when a suggestion is applied through the web interface; possibly if there is some mix of line ending forms already in the doc.) I'll take a look, and importantly rework the last commit (and force-push that). |
840e046 to
8bccd8a
Compare
Test use native types flag with non-native values.
When useNativeTypes is true, the else clause was never reached even if a native type couldn't be used; leaving only plain strings where e.g. language-tagged string literals were the source. This is a slight refactoring of the RDF to Object Conversion algorithm, to address this issue, whilst keeping or improving the clarify of the algorithm. Fixes w3c#670
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Pierre-Antoine Champin <github-100614@champin.net>
8bccd8a to
39641ad
Compare
|
OK; the change this PR proposes looks clean again now (the culprit was I recommend squash-and-merge for when we merge this, to have a clean change commit for this in the main branch. |
That change suggestion came from me. It appears that GitHub has badly tweaked something in how it handles such change suggestions. I certainly didn't intend to change the line endings, and I can find nothing about that commit that indicates the line endings were being changed. If anyone figures out a switch that I can flip to avoid such issues going forward, please let me know! |
This addresses #670.
Preview | Diff