This is the most simple of CF services returning JSON; http://localhost/Example.cfc?method=getResource&resource=whatever&returnformat=JSON
Generally to be using REST you would use the http verbs like 'get' or 'put' to interact with data (resources), instead of specifying a method. So the URL might look something like this instead; http://localhost/?whatever.json There's a cfmeetup recording which is a good introduction to REST and demos a Mach II implementation. Cheers. On 09/11/2010, at 4:23 PM, "KNOTT, Brian" <[email protected]> wrote: > Have you guys got any examples of a web service that returns JSON/REST. > > Brian Knott > Ph: 07 313 52618 | Ext: 52618 | Mob: 0404 319078 > > > -----Original Message----- > From: [email protected] [mailto:[email protected]] On Behalf > Of Kym Kovan > Sent: Wednesday, 15 September 2010 9:09 AM > To: [email protected] > Subject: Re: [cfaussie] JSON/REST > > On 15/09/2010 08:55, KNOTT, Brian wrote: >> Hi Guys, >> >> Been asked if I can create expose part of a web site through the >> JSON/REST technology instead on XML. Has anyone done this with CF, is it >> even possible. > > > JSON and REST are two separate things, JSON being commonly used to pass > data to clients like browsers, CF does that well. REST is a way of > talking to servers using simple HTTP commands so CF does that as well! :-) > > Google on: > > "REST" with coldfusion cfml -"rest of" > > lots of good hits... > > -- > > Yours, > > Kym Kovan > mbcomms.net.au > > -- > You received this message because you are subscribed to the Google Groups > "cfaussie" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/cfaussie?hl=en. > > > This e-mail is sent by Suncorp-Metway Limited ABN 66 010 831 722 or one of > its related entities "Suncorp". > Suncorp may be contacted at Level 18, 36 Wickham Terrace, Brisbane or on 13 > 11 55 or at suncorp.com.au. > The content of this e-mail is the view of the sender or stated author and > does not necessarily reflect the view of Suncorp. The content, including > attachments, is a confidential communication between Suncorp and the intended > recipient. If you are not the intended recipient, any use, interference with, > disclosure or copying of this e-mail, including attachments, is unauthorised > and expressly prohibited. If you have received this e-mail in error please > contact the sender immediately and delete the e-mail and any attachments from > your system. > If this e-mail constitutes a commercial message of a type that you no longer > wish to receive please reply to this e-mail by typing Unsubscribe in the > subject line. > > -- > You received this message because you are subscribed to the Google Groups > "cfaussie" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/cfaussie?hl=en. > -- You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en.
