On 18. Dec 2021, at 19:04, Ladislav Lhotka <ladislav.lho...@nic.cz> wrote:
> 
>    'foo: null'?  Doesn't that make testing for empty values a major
>    pain?  'if (foo)' would not work.

Same with »false«, which 7951 is not escaping into an array.
This argument simply doesn’t hold water.
As was mentioned, you would check »”foo” in o«, which works for null, false, 
and all other values that may happen to be falsy(*) in the platform.

>    JSON evolved from Javascript, so it must keep the javascript
>    meanings for these keywords.

That is a common misconception that must be stamped out, but we have 
j...@ietf.org for that discussion.

> It is indeed true that tests in JavaScript cannot really distinguish between 
> a non-existent member and member with the value of 'null'. I remember I 
> wasn't happy about this change but I thought it wasn't a big deal.

As mentioned, they can.
And, yes, this little unnecessary complexity is not a big deal even if it is 
based on mistaken beliefs; every non-trivial protocol has some unburied zombies 
in the basement.

Grüße, Carsten

(*) falsy: converted to false when implicitly coerced to a Boolean (Ant.: 
truthy)

_______________________________________________
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to