Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): John Pansewicz / John Pansewicz (John Pansewicz)
Created: 08/23/2013
Versions: 10.0
Failure Type:
Found In Build/Fixed In Build: Final / 286322
Priority/Frequency: Major / All users will encounter
Locale/System: English / Windows 7 SP1 64-bit
Vote Count: 0
Problem Description:
serializeJSON() is converting ints to floats when the number is calculated using the functions: val(), int() or ceiling(). I always assumed val() returned an int, but int() and ceiling() are supposed to return ints.
Steps to Reproduce:
Run the following code:
<cfset r = {
"x": 0,
"y": 1
}>
<cfoutput><pre>#serializeJSON(r)#</pre></cfoutput>
<cfset r.x = int(Val("1"))>
<cfset r.y = ceiling(100/10)>
<cfoutput><pre>#serializeJSON(r)#</pre></cfoutput>
Actual Result:
{"y":1,"x":0}
{"y":10.0,"x":1.0}
Expected Result:
{"y":1,"x":0}
{"y":10,"x":1}
Any Workarounds:
None
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3617509
External Customer Info:
External Company:
External Customer Name: redtopia-dev
External Customer Email:
External Test Config: My Hardware and Environment details:
CF10 update 11 Win7 x64
Attachments:
Comments: