tracker issue : CF-4163450

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

Rest service converts "Yes" "No" string to "True" "False"

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/Fixed

Reporter/Name(from Bugbase): Chia Ching Tan / Chia Ching Tan (Chia Ching Tan)

Created: 06/12/2016

Components: REST Services

Versions: 11.0

Failure Type:

Found In Build/Fixed In Build: CF11_Final / CF2016 HF3 build

Priority/Frequency: Normal / Some users will encounter

Locale/System: English / Win 2008 Server R2 64 bit

Vote Count: 0

Listed in the version 2016.0.03.300466 Issues Fixed doc
Problem Description: This problem is very similar to https://bugbase.adobe.com/index.cfm?event=bug&id=3337394, but happen in rest server

Steps to Reproduce:
Create a rest service
<cfcomponent restpath="Test" rest="true">
	<cffunction name="testStruct" access="remote" output="false" returntype="struct" httpmethod="get" restpath="/testStruct">
		<cfset ret = {"Text":"Yes", "Text2":"You should get Yes from Test"}>
		<cfreturn ret>
	</cffunction>
</cfcomponent>

Then call the rest service, and compare to call it directly with cfc.

Actual Result:
Calling rest service will return: {"Text2":"You should get Yes from Test","Text":true}
Calling the component directly will return: {"Text2":"You should get Yes from Test","Text":"Yes"}

Expected Result:
I will expect 
{"Text2":"You should get Yes from Test","Text":"Yes"}

Any Workarounds:
By adding a leading space will turn it the " Yes", but no a good solution.

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

Watson Bug ID:	4163450

External Customer Info:
External Company:  
External Customer Name: Chia Ching Tan
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments:

This bug is similar to https://bugbase.adobe.com/index.cfm?event=bug&id=CF-3337394, but in rest service
Comment by External U.
2435 | June 12, 2016 08:22:26 PM GMT
Hari, can you check whether providing additional metadata info will solve the issue?
Comment by Awdhesh K.
2436 | June 22, 2016 01:25:14 AM GMT
This fix would be available in the upcoming update of CF2016(update 3) . Following code addition is required to override the behavior. <cfset ret.setMetadata({"Text":"String"})>
Comment by HariKrishna K.
2437 | August 10, 2016 11:29:58 PM GMT
Hi Hari, how about patch for CF 11? I can't see that in ColdFusion 11 Update 10.
Comment by External U.
2438 | September 07, 2016 04:57:11 PM GMT
Hi Chia, ColdFusion 11 Update 10, was a security only release, which will not have feature bug fixes. We will evaluate to see if this can be provided as a patch and get back to you.
Comment by HariKrishna K.
2439 | September 07, 2016 10:24:45 PM GMT
Hi Hari, thanks for that.
Comment by External U.
2440 | September 07, 2016 10:39:54 PM GMT