Quantcast
Viewing all articles
Browse latest Browse all 21760

Re: Does cf10 change the way deserializejson handles null?

Oh, yeah, CF's handling of null values has always been crap, but this is hardly new. What you are describing here is how CF has always behaved.

 

There is an isNull() function now, and as far as I have experimented (not much), it does work.

 

CF's treatment of NULLs in the context of struct keys / values / struct functions etc is unfortunately not very logical or intuitive.

 

You might get a key showing up in a structkeyList() / structKeyArray() / dump of the arguments scope etc, but this doesn't mean it has a value. You need to use structKeyExists() to check for a value. This usage of structKEYExists() is illogical but it's the way CFML works. The function one uses to check if a value is null ought to be structVALUEExists() (or structVALUEIsNull() or something), but the guys who wrote CFML seem to have a tenuous a grasp on how all this should work too.

 

--

Adam


Viewing all articles
Browse latest Browse all 21760

Trending Articles