3 ms·
There's absolutely no need for two nulls / nils. But the story of JSON is that it was created by extracting part of JavaScript... so, that part was kept becaus
by crabbone 4y ago
There's absolutely no need for two nulls / nils. But the story of JSON is that it was created by extracting part of JavaScript... so, that part was kept because it was part of JavaScript, which has never been known for making good language choices. So, bad choices made once just stuck with this format. I don't think the author gave it much thought really.
- bazoom42 4y agoIt is an implementation detail in C that 0, false, and NULL has the same representation. Other languages are differet, e.g SQL.