tracker issue : CF-3596207

select a category, or use search below
(searches all categories and all time range)
Title:

SerializeJSON() - Numeric String With Trailing Period Returns Invalid JSON

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Hadyn Cotton / Hadyn Cotton (Hadyn Cotton)

Created: 07/16/2013

Components: AJAX, Plumbing

Versions: 10.0

Failure Type:

Found In Build/Fixed In Build: 286284 / CF10_Update14

Priority/Frequency: Major / All users will encounter

Locale/System: English / Windows 7 SP1 64-bit

Vote Count: 0

Problem Description:
When the following is passed through SerializeJSON() the result is not valid JSON. The numeric string ending with a period should be returned as a string and not as an integer with a trailing decimal point.

Steps to Reproduce:
<cfdump var="#SerializeJSON({a: "1."})#">

Actual Result:
{"A":1.}

Expected Result:
{"A":"1."}

Any Workarounds:
Serializing, de-serializing, and serializing will return: '{"A":1.0}' which is valid JSON.

<cfdump var="#SerializeJSON(DeSerializeJSON(SerializeJSON({a: "1."})))#">

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3596207

External Customer Info:
External Company:  
External Customer Name: hjcotton
External Customer Email:  
External Test Config: CF 10,0,11,285437

Attachments:

Comments:

We are running build 286680 (full version 10,0,12,286680) and this is most definitely NOT fixed. I can still reproduce the exact same issue.
Comment by External U.
14920 | April 10, 2014 10:26:59 AM GMT
I just checked on version 10,0,13,287689 and can confirm that this bug has NOT been fixed.
Comment by External U.
14921 | April 10, 2014 10:55:45 AM GMT
The bug has been fixed in a future release of ColdFusion.
Comment by Immanuel N.
14922 | April 11, 2014 02:36:19 AM GMT