Quantcast
Channel: Adobe Community: Message List - ColdFusion
Viewing all articles
Browse latest Browse all 21760

Re: Does cf10 change the way deserializejson handles null?

$
0
0

Adam,

 

Do you have any suggestions on how to deal with this behavior in code? 

 

In my version of the world:

  If a structure has a key; then I should not get an "undefined" runtime error trying to access that key's value. 

 

  I tried to use "isDefined()" but not nowhere.  I am unaware of any "undefined" constants or functions. 

 

There is an isNull() function in CF, right?  Has anyone tried that?  I haven't. 

 

 

The structKeyExists() function worked for me; but it feels weird.  If I look over all the structKeys, then the key shows up; but if I use structKeyExists then 'false' is returned.  Something is inconsistent. 

 

  In this case; I think I'd prefer CF does what they do w/ Database nulls and turn it into an empty string. 


Viewing all articles
Browse latest Browse all 21760

Trending Articles