tracker issue : CF-4034418

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

[ANeff] Bug for: preserveCaseForQueryColumn breaks serializeJSON()

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)

Created: 08/11/2015

Components: Serialization

Versions: 11.0

Failure Type: Enhancement Request

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Major / Some users will encounter

Locale/System: ALL / Platforms All

Vote Count: 0

Listed in the version 2016.0.0.297996 Issues Fixed doc
Verification notes: verified_fixed on September 06, 2019 using build 2016.0.01.298513
preserveCaseForQueryColumn breaks serializeJSON()

Steps to reproduce:

1) Run below code
2) See error: "Error casting an object of type java.lang.Boolean cannot be cast to java.lang.String to an incompatible type. This usually indicates a programming error in Java, although it could also mean you have tried to use a foreign object in a different way than it was designed.
java.lang.Boolean cannot be cast to java.lang.String"
3) Change !structKeyExists(URL, "_cf_ajaxproxytoken") to toString(!structKeyExists(URL, "_cf_ajaxproxytoken"))
4) Run updated code and see serialization is successful

component { = "ticket_preserveCaseForQueryColumn_breaksSerializeJSON";
  THIS.serialization.preserveCaseForQueryColumn = !structKeyExists(URL, "_cf_ajaxproxytoken");//workaround for #4034396
  void function onRequest() {
    var q = queryNew("fooCol,barCol", "varchar,varchar", [['one','uno'],['two','dos']]);
    var s = serializeJSON(q);//see error: "java.lang.Boolean cannot be cast to java.lang.String"

[empty file]

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

Watson Bug ID:	4034418

External Customer Info:
External Company:  
External Customer Name: Aaron
External Customer Email:



Fix tested on, 295680 Test case added, \coldfusion\functions\ajax\serializejson\bugs\CF-4034418\
Comment by Immanuel N.
6300 | September 24, 2015 01:15:20 AM GMT
Hi Adobe, I've verified this is fixed in CF2016 Update 1 (build 2016.0.01.298513). Thanks!, -Aaron
Comment by Aaron N.
31292 | September 06, 2019 05:44:35 AM GMT