-
Notifications
You must be signed in to change notification settings - Fork 5
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
Moves datatype definitions to an appendix and adds rdf:JSON datatype #62
Conversation
…about rdf:HTML and rdf:XMLLiteral into this appendix, as per #14 (comment)
…of this section is copied directly from Sec.10.2 of JSON-LD11
I think that's an oversight. RFC8259 obsoleted RFC7159 obsoleted RFC4627. So I see no reason to refer to the old document when the new one is valid. |
Looking at @TallTed's change suggestions, I see only now that the diff of this PR contains the complete Section 6 (Fragment Identifiers) and Section 7 (Generalized RDF Triples, Graphs, and Datasets) as new text, and then, later, as removed text snippets. I have not touched these sections at all. It seems that the Github diff functionality did not correctly recognize the actual changes. This is strange in particular because, when I did Long story short, at least half of @TallTed's change suggestion in this PR now are for text that was not supposed to be changed at all by this PR. Therefore, I am a bit unsure what to do with these suggestions. My idea is the following. I will merge right away the suggestions for the parts of the text that this PR was meant to change. Regarding the suggestions for the other parts (i.e., in Sections 6 and 7), I will keep them open for a few days and, unless I hear otherwise from any of the other editors, will then merge them later (mid next week). |
Co-authored-by: Ted Thibodeau Jr <[email protected]>
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.
Numerous small things; I'll follow on with a direct commit giving some of the rdf:HTML elements identifiers.
@TallTed's comments should not be lost, but probably belong in their own PR.
The suggested update to the rdf:JSON value space is a suggestion. It could be based directly on INFRA and ECMAScript (for number), but why repeat the work done in JSON-LD? I can push a more concrete update if agreed.
…df:JSON to another list of datatypes.
I have no objection to those comments being moved to a different PR (with or without an issue, as I don't think those comments are controversial). It would be super if you could create that PR, as I'm not certain which comments you mean, and I don't want to lose any. |
…e value space of rdf:JSON is updated from the original JSON-LD version
Co-authored-by: Ted Thibodeau Jr <[email protected]>
Since all of these small changes have been minor (mostly missing commas, correct use of plural vs singular, etc), I don't think it is worth the effort creating a separate PR and copying them all over. Therefore, I have merged them into this PR now. |
The rdf:JSON datatype being added here appears to be very different from the rdf:JSON datatype in https://www.w3.org/TR/json-ld/#the-rdf-json-datatype |
I see that too now. Just to clarify: my original changes regarding the rdf:JSON datatype in this PR were only to insert an almost verbatim copy of the text of https://www.w3.org/TR/json-ld/#the-rdf-json-datatype into the rdf:JSON section in this document (rdf-concepts). Yet, it seems that @gkellogg's commits to this PR have edited the section quite a bit. |
There is no section 24.5 in the current ECMASCRIPT document. |
Why is the value space not the RFC8785 canonical mapping? |
I recall the discussion, both at TPAC, and from @pfps comments before. I had suggested that we "correct" the value space based on this notion. Of course, we can revert these changes and go back to the JSON-LD wording if there's not consensus. However, it was my understanding that using the JSON Canonicalization Scheme as the value space was wrong.
We don't deviate (intentionally) from the canonical form defined by JCS/RFC8785. |
Links please. I don't see anything on #14. Let's execute on this PR as originally given - which is editorial because the adoption of text from JSON-LD11 was already signallled. That's "editorial". It can have all the non-rdf:JSON items thet have also been added. Then a second PR which is "substantive", "needs discussion". I am finding it very hard to get a detailed understanding of the substantive change on a fragmented PR. While I'm not that enthusiastic about defining the a datatype value space based on canonical forms generally, it does work, uses the JSON community RFC 8785, and, for rdf:JSON, has been published. I think that a new data model in RDF concepts for JSON has long term risks of differences to definitions elsewhere. I would like to see evidence that it does match the RFC 8785 canonicalization. RFC 8259 (defn of JSON) does define an abstract syntax (parse tree) for JSON which could be considered a data model. |
Co-authored-by: Ted Thibodeau Jr <[email protected]>
…efined by JSON-LD 1.1. Note: this could be simplified by simply saying that the value space is an RDF string representing the lexical value using the JSON Canonicalization Scheme
@afs said:
I reverted the changes to the rdf:JSON value space (although it does need to be updated to address the issue on using JCS, at least), and preserved the original commits for another PR. See 39cdf49. As I said in the commit, the value space could be re-defined (without going to an INFRA representation) by being an RDF string representation conforming to the formatting requirements of the JSON Canonicalization Scheme [RFC8785]. Given differences in recollection of discussions, and likely more pressing matters, the WG should consider next steps. See #65. |
<a data-cite="INFRA#map-value">values</a>, which may be any of the above | ||
<a data-cite="RFC4627#section-2.1">JSON values</a>.</li> | ||
<li>They MUST NOT contain any unnecessary whitespace.</li> | ||
<li>Keys in objects MUST be ordered lexicographically.</li> |
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.
uh-oh. lexicographically
, again?
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.
The section can still be improved, but I was trying to just go back to the JSON-LD 1.1 definition. We can either improve that, or go in the native value-space suggested previously and in #65. At this point, the fewer moving parts the better.
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.
Fewer moving parts is generally better, yes.
Still, we now know that lexicographical
ordering is ambiguous at best, so I think we should replace that with the ordering we believe to be most unambiguous and closest to the original intent, which I think now means Unicode code point order
(or something close to that).
Some minor comments on rdf:JSON datatype (definition mostly copied from JSON-LD). This is not an endorsement of the value space, as opposed to either having the value space just be the lexical space or having the value space being some sort of JSON values. The value space should not have SHOULD. The value space is what it is. The value space is defined as a set of RDF strings and then later claimed to be distinct from the value space of xsd:string. It would be better to state at the beginning that the value space is separate from the value space of xsd:string. In any case, JSON texts can include surrogate code points so the value space cannot be just RDF strings (assuming that surrogate code points stay out of RDF strings). Lexicographic order needs to be very carefully defined. What is the underlying ordering? What happens if there are duplicate keys in an array? The lexical-to-value mapping uses ECMASCRIPT and thus coerces JSON numbers to ECMASCRIPT floating point. Why impose this limitation? JSON has its own string escapes so it is possible to have double escaping in RDF serializations, as in '"\xDEAD"'. I think this is going to cause problems. |
Co-authored-by: Ted Thibodeau Jr <[email protected]>
Just for the record I am happy with his PR now (I mention this because, as creator of it, I cannot mark it as approved). After merging it, there can be another PR to edit the section about the |
RFC4627 -> RFC8259
spec/index.html
Outdated
generalization of RDF triples.</p> | ||
<dt id="JSON-lexical-space">The <a>lexical space</a></dt> | ||
<dd>is the set of all <a>strings</a> that conform to the | ||
<a data-cite="RFC4627#section-2">JSON Grammar</a> as described in |
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.
A link <a data-cite="RFC4627#section-2">JSON Grammar</a>
duplicates the next lines. BTW, current version of JSON is defined in RFC8259
spec/index.html
Outdated
<dd> | ||
is the space defined by | ||
the <a data-cite="JSON-LD11#dfn-internal-representation">JSON-LD internal representation</a> [[JSON-LD11]], | ||
being the <a data-cite="RFC4627#section-3">JSON values</a> <a data-lt="list">array</a>, |
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.
<a data-cite="RFC4627#section-3">
-> <a data-cite="RFC7159#section-3">
spec/index.html
Outdated
<a data-cite="INFRA#nulls">null</a>.</li> | ||
<li><a>Map</a> <a data-cite="INFRA#map-key">keys</a> are <a>strings</a> with | ||
<a data-cite="INFRA#map-value">values</a> may be any of the above | ||
<a data-cite="RFC4627#section-3">JSON values</a>.</li> |
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.
<a data-cite="RFC4627#section-3">
-> <a data-cite="RFC7159#section-3">
spec/index.html
Outdated
|
||
Two <a data-cite="RFC4627#section-3">JSON values</a> are considered equal |
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.
<a data-cite="RFC4627#section-3">
-> <a data-cite="RFC7159#section-3">
spec/index.html
Outdated
<a>boolean</a>, or | ||
<a data-cite="INFRA#nulls">null</a>, | ||
if they are both an <a data-lt="list">array</a> with equal <a data-cite="INFRA#list-item">entries</a>, or | ||
if they are both a <a>map</a> with equal <a data-cite="INFRA#map-entry">map entries</a>. |
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.
Why to mix ECMAScript spec, INFRA, and RFC4627/7159? Maybe it will be more consistent to refer only to one source (e.g. RFC7159)?
Yes, the last two I removed in the last commit. |
Co-authored-by: Ted Thibodeau Jr <[email protected]>
I will merge this one now to make way for @gkellogg to create the follow-up PR with his proposed changes to the section about the rdf:JSON datatype. |
As agreed during the FSF meeting at TPAC, this PR
rdf:HTML
andrdf:XMLLiteral
datatypes into that appendix, andrdf:JSON
datatype from Section 10.2 of [JSON_LD11] into this new appendix as well.Regarding the latter, I have indeed just copied the definition of the
rdf:JSON
datatype. When doing so, there were two things that I was wondering:(GitHack preview)
Preview | Diff