3 ms·
Ah, so the problem is JSON compatibility. Yeah, I can see that. But I have to say: I think the mistake was on JSONs part. That's what `nil` should mean, imho:
by samatman 6y ago
Ah, so the problem is JSON compatibility.
Yeah, I can see that. But I have to say: I think the mistake was on JSONs part. That's what `nil` should mean, imho: the value of anything which has no other value.
An object { "foo" : 12, "bar" : null } could just be { "foo" : 12 }, and if I was expecting a "bar" field, well, I can set it to null/nil myself.
Other people have pointed out ways to work around it, so I won't go down that road myself.