|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
CFC returns escaped strings grrrr
I am trying to do some jsonP stuff and call a CFC directly. The problem isBrook Davies 06/03/12 02:31 P When you call it, are you adding returnformat=json in the url? It willRaymond Camden 06/03/12 02:59 P omg! - your right!!! Thank you - I don't know how I missed that!Brook Davies 06/03/12 03:32 P I am trying to do some jsonP stuff and call a CFC directly. The problem is the CFC doesn't return the correctly formatted string. I want to return a string from the remote CFC call but it quotes the string and escapes the quotes. I return: jsonp_fa({"RESULT":"ok"}) And I get: "jsonp_fa({\"RESULT\":\"ok\"})" My CFC method is set to return a string with no formatting, so why does it escape the string???!! <cffunction name="record" access="remote" returntype="string" returnformat="plain" output="true"> Brook When you call it, are you adding returnformat=json in the url? It will override the returnformat in your function call. ----- Excess quoted text cut - see Original Post for more ----- omg! - your right!!! Thank you - I don't know how I missed that! Brook When you call it, are you adding returnformat=json in the url? It will override the returnformat in your function call. ----- Excess quoted text cut - see Original Post for more -----
|
May 23, 2013
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||