Status/Resolution/Reason: Closed/Withdrawn/NotABug
Reporter/Name(from Bugbase): Darien Brown / Darien Brown (Darien Brown)
Created: 03/18/2015
Components: Language, Serialization
Versions: 11.0
Failure Type: Incorrect w/Workaround
Found In Build/Fixed In Build: CF11_Final /
Priority/Frequency: Major / All users will encounter
Locale/System: ALL / Core
Vote Count: 0
Problem Description: When a struct is created inline in cfscript, the serialization.preserveCaseForStructKey has no effect. All keys will serialize in upper case.
Steps to Reproduce: Create a struct in cfscript like this:
x = { MyCamelKey="Test string", yetAnotherKey="Another string", mixedCaseBool=true };
Make sure this.serialization.preserveCaseForStructKey is set to true in Application.cfc.
Use SerializeJSON(x) and verify the output. The keys will appear in upper case.
This pattern is used a lot to create a struct populated with default values.
Actual Result: Serialized struct contains all upper case keys.
Expected Result: Keys should be in their original case from when the struct was declared.
Any Workarounds:
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3955565
External Customer Info:
External Company:
External Customer Name: Darien
External Customer Email:
External Test Config: My Hardware and Environment details: Windows Server 2012, IIS 8.5, ColdFusion 11, x64.
Attachments:
Comments: