Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Chris Phillips / Chris Phillips (cf_chris)
Created: 01/17/2014
Versions: 10.0
Failure Type: Data Corruption
Found In Build/Fixed In Build: Final / CF10_Update14
Priority/Frequency: Critical / Some users will encounter
Locale/System: English / Windows 7 SP1 64-bit
Vote Count: 0
Problem Description:
I think it's any string that conforms to the following pattern: ([0-9]+D ) << Notice the space at the end.
Steps to Reproduce:
<cfoutput>
<p>#SerializeJSON({s:"1A "})#</p>
<p>#SerializeJSON({s:"1D"})#</p>
<p>#SerializeJSON({s:"12D "})#</p>
<p>#SerializeJSON({s:"34D "})#</p>
<cfset str = "56D " />
<p>#SerializeJSON({s:str.toString()})#</p>
</cfoutput>
Actual Result:
{"S":"1A "} // Fine
{"S":"1D"} // Fine
{"S":12D } // Wrong (will cause JS error)
{"S":34D } // Wrong (will cause JS error)
{"S":56D } // Wrong (will cause JS error)
Expected Result:
{"S":"1A "}
{"S":"1D"}
{"S":"12D "}
{"S":"34D "}
{"S":"56D "}
Any Workarounds:
Trim the values.
However, some may actually want the full string. And having something that innocent create invalid JSON is stupid.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3695697
Deployment Phase: Release Candidate
External Customer Info:
External Company:
External Customer Name: cf_chris
External Customer Email:
External Test Config: My Hardware and Environment details:
Windows 7 (SP1) 64-bit
ColdFusion 10 - 10,0,12,286680
Java Version - 1.7.0_17
Attachments:
Comments: