Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Sean Corfield / Sean Corfield (Sean Corfield)
Created: 09/26/2009
Components: Language, Functions
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 9,0,0,251028 / 256226
Priority/Frequency: Minor / Some users will encounter
Locale/System: English / Platforms All
Vote Count: 6
Problem:
123 is serialized to 123.0 in JSON (using the serializeJSON() function). This can cause problems for systems expecting literal values (such as the Transparensee search engine).The workaround is to add javaCast("int",value) all over the place which is ugly and, frankly, stupid. An integer should serialize to an integer!
Method:
Run this code:<cfset x = [ 123 ] /><cfoutput>#serializeJSON(x)#</cfoutput>Expected: [123]Actual: [123.0]
Result:
None, just a bad JSON serialization.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3040210
External Customer Info:
External Company:
External Customer Name: Sean Corfield
External Customer Email: 479B4EDC43F3A88B992016B6
External Test Config: 09/26/2009
Attachments:
Comments: