3 ms·
> For some languages null and false are the same thing (and I prefer it that way too) Ugh, It's hard to pin the blame on JSON for this one. Seriously? My othe
by planede 4y ago
> For some languages null and false are the same thing (and I prefer it that way too)
Ugh, It's hard to pin the blame on JSON for this one. Seriously?
My other gripe is languages/libraries that can't distinguish between missing key and present key with null value. It's more subtle, but these are also different.
- crabbone 4y agoThere'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.