tracker issue : CF-3780056

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

Preserve case for Struct keys for Serialization Does Not Work

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/NotABug

Reporter/Name(from Bugbase): Jojo Serquina / Jojo Serquina (Jojo Serquina)

Created: 06/23/2014

Components: Language

Versions: 11.0

Failure Type:

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Major / All users will encounter

Locale/System: English / Windows 8.1/64bit

Vote Count: 1

Problem Description:
Preserve case for Struct keys for Serialization (Admin setting) - doesn't work! Prior to version 11, the keys are UPPERCASE.


Steps to Reproduce:
- Preserve case for Struct keys for Serialization ( Admin setting is off )
- Create a remote method that returns a JSON string.
- Call remote method via ajax (jquery, extjs, etc.)
- Examine response

Actual Result:
- the JSON string has camelcasing on the keys.


Expected Result:
- since the "Preserve case for Struct keys for Serialization" setting is off, it should work the same as pre-version 11, which are in UPPERCASE.

Any Workarounds:
None that is known.

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

Watson Bug ID:	3780056

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

Windows 8.1, Core i7, 8GB Ram

Attachments:

Comments:

Also tested the functionality while the setting is ON. <cfset myQuery = QueryNew('ID,Name,Address','Integer,VarChar,Varchar') /> <cfset QueryAddRow(myQuery,1) /> <cfset QuerySetCell(myQuery,'ID',1,1) /> <cfset QuerySetCell(myQuery,'Name','John Doe',1) /> <cfset QuerySetCell(myQuery,'Address','Street Named Doe',1) /> <cfquery name="qNew" dbtype="query"> SELECT Id as RecID, Name as FullName, Address as StreetAddress FROM myQuery WHERE ID = 1 </cfquery> <cfset stcTest = {} /> <cfset stcTest.recID = qNew.RecID /> <cfset stcTest.recFullName = qNew.FullName /> <cfset stcTest.recStreetAddress = qNew.StreetAddress /> Serialized Query Dump <cfdump var="#SerializeJSON(qNew)#"> {"COLUMNS":["RECID","FULLNAME","STREETADDRESS"],"DATA":[[1,"John Doe","Street Named Doe"]]} Serialized Structure Dump <cfdump var="#SerializeJSON(stcTest)#"> {"recStreetAddress":"Street Named Doe","recID":1,"recFullName":"John Doe"}
Comment by External U.
11830 | June 23, 2014 10:07:10 AM GMT
potentially a show stopper for upgrade. Please fix.
Vote by External U.
11832 | June 23, 2014 10:44:38 AM GMT
Could not reproduce the bug. The inconsistency is probably due to caching. Please clear Template / Component cache from the options available in CF Administrator > Caching Closing the bug as Not a bug. Regarding the code snippet posted as a comment, the "Preserve case for Struct keys for Serialization" admin setting is applicable only for struct's and not queries.
Comment by Immanuel N.
11831 | August 27, 2014 05:24:35 AM GMT