Closed azaroth42 closed 5 years ago
RESOLUTION: WG believes that it is least surprising to process null as a JSON literal in this case, and not to remove the property in the internal representation, and thus the null should be preserved.
This issue was discussed in a meeting.
RESOLVED: WG believes that it is least surprising to process null as a JSON literal in this case, and not to remove the property in the internal representation, and thus the null should be preserved.
@type:
@json
@json
value type@json
type@json
than for it to stay around@version:
1.1Actually, I don't think there's anything more to say in the syntax document. It's handled in w3c/json-ld-api#155. Happy to add some extra wording to the syntax document if people think it necessary.
I think there should be a non-normative note in syntax, in 4.2.2, as there is a potential expectation that nulls will not be processed, as with other cases.
Why is null
not converted to rdf:nil
?
Why is null not converted to rdf:nil?
rdf:nil
is not equivalent to null
. rdf:nil
is used to indicate the end of an RDF list.
The spec says the following:
The resource rdf:nil is an instance of rdf:List that can be used to represent an empty list or other list-like structure.
Oh, my bad. Thank you.
Also, this is specifically about JSON literals, where the JSON values are intentionally left as JSON rather than mapped into RDF.
Typically the null value removes the property or resets a context. However JSON literals capture any legal JSON value, which includes null.
Thus there is ambiguity currently as to the expected result of a property with a JSON literal typed value where the
@value
is null. Current implementations are inconsistent between compact and expanded form, and thus there is missing text in the algorithm to preserve null when the type is@json
.