dret / I-D

Internet Drafts I've authored or contributed to.
16 stars 13 forks source link

Usage of "Null value" (in particuar for the JSON serialization) #146

Closed dret closed 3 years ago

dret commented 3 years ago

raised by @idg10 at https://mailarchive.ietf.org/arch/msg/httpapi/lvYDG1jI-x6-My2yllvkke1akeA:

I think I might have found an inconsistency in “Section 4.2.2. Link Context Object” of draft-wilde-linkset-07. This states that in cases where “no value is to be provided for the "anchor" member”, a link context object MUST provide an: "anchor" member with null value ("anchor": ""). The example in parentheses appears to contradict the text that it purports to illustrate: it shows an empty string, which is not the same thing as a null value in JSON. (This is inside “Section 4.2 JSON Document” so JSON types and values are relevant here. Moreover, since draft-wilde-linkset-07 doesn’t define what it means by null, the obvious interpretation of “null” in this context is the definition given by the JSON spec.) If a null value is required (as the text states), then the example should be "anchor": null, shouldn’t it? Alternatively, if the example is correct as it stands, then shouldn’t the preceding text say “an empty string value” instead of “null value”? Also, “4.2.3. Link Target Object” does the same thing regarding href, offering ("href": "") as an example of what it calls a “null value”. If the intention is that “null value” is just the language being used to describe an empty string intended to signify an absent value, it would be helpful to clarify that, since JSON defines null as a type and also as a distinct value.

dret commented 3 years ago

added by @darrelmiller at https://mailarchive.ietf.org/arch/msg/httpapi/ZVbV4u_MEZPyyaedGEG-2Rdqejo:

In addition to Ian’s comment, it would be useful to understand why anchor is a required property. RFC8288 states,

Why does the JSON serialization make this property required and then have to deal with issues around null vs empty string?

richsalz commented 3 years ago

Please use https://github.com/ietf-wg-httpapi/linkset/issues/3