tracker issue : CF-3952968

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

Passing string property value as "yes" or "no" to serializeJSON function converts the values to true or false

| View in Tracker

Status/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:

We are unable to repro this with HF5 in place. One observation was that the spelling goes wrong in - component acccessors=true Can you please try this with the latest hotfix installed.
Comment by Immanuel N.
8045 | May 19, 2015 11:40:14 PM GMT
Testing again on HF5 (even with the spelling mistake!) seems to work correctly now.
Comment by External U.
8046 | May 20, 2015 02:29:26 AM GMT
Thanks for the update, Toby. Will be closing this bug.
Comment by Immanuel N.
8047 | May 20, 2015 03:14:21 AM GMT