tracker issue : CF-3697516

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

JSON data and ISO country codes NO

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/Duplicate

Reporter/Name(from Bugbase): JeanMarc Callebaut / JeanMarc Callebaut (jmcmto99)

Created: 01/22/2014

Components: AJAX, Plumbing

Versions: 10.0

Failure Type: Data Corruption

Found In Build/Fixed In Build: Final /

Priority/Frequency: Major / All users will encounter

Locale/System: English / Win All

Vote Count: 0

Duplicate ID:	CF-3337394

Problem Description:

Issue was already raised in Bug #3337394

Steps to Reproduce:

<cfset testStruct = {"test" = "NO"}> 
<cfdump var="#testStruct#"> <!--- the test key is "NO" --->
<cfset json = SerializeJSON(testStruct)>
<cfdump var="#json#"> <!--- Test is now false --->

Actual Result:

{"test":false}

Expected Result:

{"test":"NO"}

Any Workarounds:

None, except adding an extra space at the end of the string so CF is considering it as a string and not as true/false

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

Watson Bug ID:	3697516

External Customer Info:
External Company:  
External Customer Name: jmcmto99
External Customer Email:  
External Test Config: My Hardware and Environment details:



Coldfusion 10 Updates 13

Attachments:

Comments:

I thought that it was already corrected, see: Bug #CF-3337394, but this is still happening this is also true when using : <cffunction name="getCountries" access="remote" returnFormat="json" output="false"> .... <cfset stcReturn = {SUCCESS=true,DATA=arrCountries,DATASET=#qryGetCountOfCountries.NB_OF_ROWS#} />
Comment by External U.
13628 | January 22, 2014 07:12:16 AM GMT
As of now, the datatype support has been added for query and CFC. So if a query is being serialized in JSON OR a cfc object is being serialized where the datatype is defined on this field, SerializeJSON will be able to serialize it correctly. In the absence of datatype, it tries to take the best guess of the datatype and serializes it accordingly. We are planning to revamp the way we work with the datatypes in the next release. This will be taken up as part of that.
Comment by Rupesh K.
13629 | May 02, 2014 06:37:33 PM GMT