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

I ran into the same problem. I fixed it by doing, conceptually, this:

 

 

<cfif structKeyExists(deserializedJSON, key)>

<cfset realValue = deserializedJSON[key]/>

<cfelse>

<!--- process as null value --->

<cfset realValue = "null"/>

</cfif>

 

Of course, everytime you try to access a value that may be 'null' and is therefore now 'undefined' you have to perform a check like this.  I'm lucky in that I only had to make the change in one spot.  Your approach might be easier. 

 

Also, there is a bug for this.


Viewing all articles
Browse latest Browse all 21760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>