FAQ
"Roland" == Roland Philibert writes:
Roland> Thanks all for your suggestions so far. I was I guess on
Roland> the right track with JSON:XS but I had also seen REST but so
Roland> far I am still unsure as what the best way to go

Catalyst::Controller::REST + DBIx::Class::ResultClass::HashRefInflator
works pretty well:

$self->status_ok(
$c,
entity => $rs->search({}, {
result_class => 'DBIx::Class::ResultClass::HashRefInflator'
})->next
);

Then if you ask for a Content-Type of application/json you'll get JSON
from that in your response.

--
Eden Cardim
Code Monkey http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://blog.edencardim.com/ http://www.shadowcat.co.uk/servers/
http://twitter.com/#!/edenc

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 6 of 16 | next ›
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedSep 12, '11 at 12:01p
activeOct 7, '11 at 7:55a
posts16
users8
websitecatalystframework.org
irc#catalyst

People

Translate

site design / logo © 2021 Grokbase