Subject: Re: [httpapi] draft-wilde-linkset-07 null anchor

From: Darrel Miller <[email-masked]>
Date: Sun, 15 Nov 2020 20:44:59 +0000

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

Ø  When present, the anchor parameter overrides this with another URI,

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

Darrel

From: Ian Griffiths<mailto:[email-masked]>
Sent: October 28, 2020 7:32 AM
To: [email-masked]<mailto:[email-masked]>
Subject: [httpapi] draft-wilde-linkset-07 null anchor

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.

--
Ian Griffiths
endjin.com

---

From: Erik Wilde <[email-masked]>
Date: Sun, 15 Nov 2020 15:47:37 -0800

hello darrel.

On 2020-11-15 21:44, Darrel Miller wrote:
> In addition to Ian’s comment, it would be useful to understand why 
> anchor is a required property.  RFC8288 states,
> 
> ØWhen present, the anchor parameter overrides this with another URI,
> 
> Why does the JSON serialization make this property required and then 
> have to deal with issues around null vs empty string?

thanks for this additional comment regarding how anchors are defined in 
the JSON representation. i added it to 
https://github.com/dret/I-D/issues/146 linking to you and the archived 
email.

thanks and cheers,

dret.

-- 
erik wilde | mailto:[email-masked] |
            | http://dret.net/netdret    |
            | http://twitter.com/dret    |