-
Notifications
You must be signed in to change notification settings - Fork 8
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
JSON values #91
Comments
Good question. It's type error. The dispatches are based on datatype. Other points: XSD does not define a type conversion from rdf:JSON in the same way it does for xsd:integer to xsd:double. xsd:double is "patterned after IEEE 754-2008", and has been made to "mirror IEEE 754-2008", but XSD 1.1 does not say the value space "is" IEEE 754. You could ask about booleans where the value space (all defs) is |
How did xsd:double get in here? |
How about ' "7" '^^rdf:JSON = "7" |
I think it's the same point here, there is no defined way to compare rdf:JSON literals with xsd:string. |
F&O defines operations on numerics by applying subtype substitution and numeric type promotion. (double, integer) becomes (double, double). JSON numbers are IEEE 754 , xsd:double are related to IEEE 754. |
@gkellogg But isn't the value of ' "7" '^^rdf:JSON a string? |
@afs But isn't the value of "7"^^rdf:JSON just a number, not an IEEE floating point number? |
Is an INFRA/ECMAScript string the same as an XSD string? At a certain level, but where is that defined? Is a JSON number the same as an xsd:float/double? Or boolean? I'm note sure we need to define comparison between JSON values and any other. |
These one line comments without background leaving a lot open as to what the point being made actually is.
JSON number value is "corresponding" -- https://tc39.es/ecma262/#sec-terms-and-definitions-number-value |
Just because two values space contain e.g. strings does not mean they are comparable for two reasons: 1: https://www.w3.org/TR/xmlschema11-2/#value-space
RDF Semantics:
"The range" is specific to the datatype. 2: Operators are matched to functions, in SPARQL, by dispatch, and the functions are datatype specific. JSON-LD makes this clear:
|
No - https://tc39.es/ecma262/#sec-terms-and-definitions-string-value are encoding in UTF-16.
Infra:
should be read as specific to whatwg. JSON Numbers are binary patterns of IEEE 754, not rational numbers - encoding vs abstract value. |
can we close this issue as superceded by w3c/rdf-concepts#116 ? |
Agreed, closing |
With rdf:JSON there are now JSON values. But what is a JSON value?
For example, in SPARQL should
"7"^^rdf:JSON = 7
be true or false?
The text was updated successfully, but these errors were encountered: