REST Endpoints: Am I required to do serialization myself?

26 views
Skip to first unread message

Adam Tuttle

unread,
Apr 22, 2012, 2:49:24 PM4/22/12
to mach-ii-for...@googlegroups.com
Hi all...

I'm setting up REST endpoints on 1.9 for the first time today. I got it working by using serializeJson() in my endpoint CFC to serialize to a string.

Just wanted to check that this is by design. Is it, or am I missing something? I don't really see any mention of formatting data for return in the documentation:


Thanks!
Adam

Kurt Wiersma

unread,
Apr 23, 2012, 3:39:27 PM4/23/12
to mach-ii-for...@googlegroups.com
I believe that is correct. At the moment we don't have anything
special built into Mach II to handle serialization for REST.

--Kurt

> --
> To post to this group, send email to mach-ii-for...@googlegroups.com
> For more options and to unsubscribe, visit this group at
> http://groups.google.com/group/mach-ii-for-coldfusion?hl=en
>
> SVN: http://svn.mach-ii.com/machii/
> Wiki / Documentation / Tickets: http://trac.mach-ii.com/machii/

Adam Tuttle

unread,
Apr 23, 2012, 4:12:53 PM4/23/12
to mach-ii-for...@googlegroups.com
Thanks Kurt!


On Monday, April 23, 2012 3:39:27 PM UTC-4, kwiersma wrote:
I believe that is correct. At the moment we don't have anything
special built into Mach II to handle serialization for REST.

--Kurt

On Sun, Apr 22, 2012 at 1:49 PM, Adam Tuttle <ad...@fusiongrokker.com> wrote:
> Hi all...
>
> I'm setting up REST endpoints on 1.9 for the first time today. I got it
> working by using serializeJson() in my endpoint CFC to serialize to a
> string.
>
> Just wanted to check that this is by design. Is it, or am I missing
> something? I don't really see any mention of formatting data for return in
> the documentation:
>
> http://trac.mach-ii.com/machii/wiki/IntroToRESTEndpoints
>
> Thanks!
> Adam
>
> --

> To post to this group, send email to mach-ii-for-coldfusion@googlegroups.com

Adam Tuttle

unread,
Apr 26, 2012, 11:29:44 PM4/26/12
to mach-ii-for...@googlegroups.com
Follow-up question: Does the endpoint name in mach-ii.xml need to match the URI?

I originally started with an endpoint name of "sessions", and it worked. I decided to rename it to "sessionCollection" because I was going to split out the collection and members into different CFCs. Doing that seemed to break it. (With MACHII_CONFIG_MODE = 1 in Application.cfc) Changing it back to just "sessions" seemed to fix it.

If the endpoint name does need to be something specific, and is not just arbitrary, then I don't think the docs explain that well enough. :)

Thanks!
Adam
Reply all
Reply to author
Forward
0 new messages