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

Search cf-talk

July 04, 2009

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

Home / Groups / ColdFusion Talk (CF-Talk)

Return JSON from a CFC

Author:
Raymond Camden
01/05/2009 09:46 PM

You don't want to call your local CFC with ?wsdl. That's the web service URL. You want to just call the CFC with it's normal name, and pass the method and the returnFormat argument. So your url should be something like: url="my.cfc?method=somemethod&returnformat=json" This will run the somemethod function of my.cfc and tell CFC to format the result into json. You don' t have to create the JSON yourself. Assuming you are using CF8 of course. > I recall reading a blog posting that mentioned that CF returns > non-standard JSON by default. Its a more compact design but required a > custom data reader for the Ext library. While that isn't jQuery, it > might help you to your goal: > > http://blog.cutterscrossing.com/index.cfm/2008/11/20/ColdFusion-Query-Json-Data-Reader > > Judah > > >> All,


Mailing Lists