[Catalyst] How to de-serialize json?

Bill Moseley moseley at hank.org
Thu Jan 28 00:14:29 GMT 2010

On Wed, Jan 27, 2010 at 1:16 PM, Tomas Doran <bobtfish at bobtfish.net> wrote:

> On 27 Jan 2010, at 15:33, Bill Moseley wrote:
>> No big deal.  I was just curious why the HTTP::Body approach was not used
>> in the existing REST/RPC modules, as that was already the place used by
>> Catalyst to de-serialize the body.  I thought maybe there was a reason I
>> might not understood, which is why I asked.
> HTTP::Body isn't really structured for this - you can (and I _do_ in one =
> my apps) add or override the content type handlers.
> However as it's class data, this is perl interpreter wide - which means
> that two different applications with conflicting requirements can't exist=
> the same mod_perl interpreter - not awesome.

I see.  So you are saying that Content-Type: application/json might need to
be deserialized differently in different applications that share the same
interpreter?  Obviously, json could decode into an array ref so that could
not be mapped to request parameters.  Is that what you mean?  Or that an
application might want the raw json?

-- =

Bill Moseley
moseley at hank.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20100127/cc112=

More information about the Catalyst mailing list