House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

CFC returns escaped strings grrrr

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Brook Davies
06/03/2012 02:31 PM

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

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Raymond Camden
06/03/2012 02:59 PM

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 -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Brook Davies
06/03/2012 03:32 PM

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 -----


<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 23, 2013

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31   

Designer, Developer and mobile workflow conference