Title:
Passing string property value as "yes" or "no" to serializeJSON function converts the values to true or false
| View in TrackerStatus/Resolution/Reason: Closed/Withdrawn/NotABug
Reporter/Name(from Bugbase): Toby Weston / Toby Weston (Toby Weston)
Created: 03/13/2015
Components: Language
Versions: 11.0
Failure Type:
Found In Build/Fixed In Build: CF11_Final /
Priority/Frequency: Major / All users will encounter
Locale/System: ALL / Win 2008 Server R2 64 bit
Vote Count: 0
This is a repeat of bug 3845642. It was marked as fixed in CF 10 but this still exists in CF 11 Update 4. Looks like it worked in Update 3 as well!
test.cfc:
component acccessors=true {
property string title;
property string surname;
}
test.cfm:
<cfscript>
o = new test();
o.title = "Doctor";
o.surname = "No";
writeOutput(serializeJson(o));
</cfscript>
Execute test.cfm
Actual: {"SURNAME":false,"TITLE":"Doctor"}
Expected: {"SURNAME":No,"TITLE":"Doctor"}
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3952968
External Customer Info:
External Company:
External Customer Name: Toby
External Customer Email:
External Test Config: Win 2008 IIS 7 CF 11 Update 4
Attachments:
Comments: