on your ajax call, did you add "returnformat: 'json' as one of your post data arguments? If you don't specify this, then the remote method will return WDDX by default.
Steve 'Cutter' Blades Adobe Community Professional Adobe Certified Expert Advanced Macromedia ColdFusion MX 7 Developer ____________ http://cutterscrossing.com Co-Author "Learning Ext JS 3.2" Packt Publishing 2010 https://www.packtpub.com/learning-ext-js-3-2-for-building-dynamic-desktop-style-user-interfaces/book "The best way to predict the future is to help create it" On 3/14/2014 3:21 PM, Byron Mann wrote: > The default for the return format for a remote cffunction call is WDDX. > Sounds like inside your CFC you are serializing the return value first. > > So something like return serializeJson(myValue); > > If the return "string" in this case is JSON, then your remote call to the > CFC should include a returnformat=plain, to return the string as is. > > Byron Mann > Lead Engineer & Architect > HostMySite.com > > > On Fri, Mar 14, 2014 at 3:26 PM, Rixon Reed <[email protected]> wrote: > >> I have a CFC that I'm trying to return JSON data in a web service.=20 >> If I do a dump before I return the code to the calling program, the JSON >> is= >> fine. However it returns this to the calling program:"[\"\\n\\t\\n\\t\\t\\= >> >> n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\= >> >> t\\t\\n\\t\\t\\n\\t\\t\\n\\t<\\\/portfolio>\\n\\t\\n\\t\\t\\n\\t\\t\\n\\t\\= >> >> t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t<\\\/portfolio= >> \\n\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t<\\\/portfolio>\\n\\t\\n\\= >> >> t\\t\\n\\t\\t\\n\\t<\\\/portfolio>\\n\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\= >> >> t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t<\\\/portfolio>\\n\\t\\= >> >> n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\= >> >> t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\= >> >> t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\= >> >> n\\t<\\\/portfolio>\\n\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\= >> >> t<\\\/portfolio>\\n\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t<\\\/category>\\n\\t= >> >> \\t<\\\/category>\\n\\t<\\\/category>\\n\\t\\n\\t\\t\\n\\t\\t<\\\/category>= >> >> \\n\\t\\t\\n\\t\\t\\t\\n\\t\\t<\\\/portfolio>\\n\\t\\t\\n\\t\\t<\\\/categor= >> >> y>\\n\\t\\t\\n\\t\\t<\\\/category>\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t<\\\/portfo= >> >> lio>\\n\\t\\t\\n\\t\\t<\\\/portfolio>\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\t\\= >> >> n\\t\\t\\t\\t\\n\\t\\t\\t<\\\/portfolio>\\n\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\= >> >> t\\t\\t\\n\\t\\t\\t<\\\/portfolio>\\n\\t\\t<\\\/category>\\n\\t\\t\\n\\t\\t= >> >> <\\\/portfolio>\\n\\t<\\\/category>\\n\\t\\n\\t<\\\/portfolio>\\n\\t\\n\\t<= >> >> \\\/portfolio>\\n\\t\\n\\t<\\\/portfolio>\\n<\\\/root>\",\"\\n\\t\\n\\t<\\\= >> >> /category>\\n\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\= >> >> t\\t\\n\\t\\t\\n\\t\\t\\n\\t<\\\/portfolio>\\n\\t\\n\\t\\t\\n\\t\\t\\n\\t<\= >> >> \\/portfolio>\\n\\t\\n\\t<\\\/category>\\n\\t\\n\\t<\\\/category>\\n<\\\/ro= >> ot>\"]" >> >> What am I doing wrong? Thanks in advance. >> >> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357938 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

