Re: [Catalyst] How to de-serialize json?

2010-01-27 Thread Bill Moseley
On Tue, Jan 26, 2010 at 6:33 AM, J. Shirley jshir...@gmail.com wrote: I'm all for reusable code, but in no way should HTTP::Body start taking this behavior by default. I'm not really that sure how effective it is, anyway. No, I was not suggesting that would be the default (although I'm

Re: [Catalyst] How to de-serialize json?

2010-01-27 Thread J. Shirley
On Wed, Jan 27, 2010 at 7:33 AM, Bill Moseley mose...@hank.org wrote: On Tue, Jan 26, 2010 at 6:33 AM, J. Shirley jshir...@gmail.com wrote: I'm all for reusable code, but in no way should HTTP::Body start taking this behavior by default.  I'm not really that sure how effective it is,

Re: [Catalyst] How to de-serialize json?

2010-01-27 Thread Tomas Doran
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,

Re: [Catalyst] How to de-serialize json?

2010-01-27 Thread Bill Moseley
On Wed, Jan 27, 2010 at 1:16 PM, Tomas Doran bobtf...@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

Re: [Catalyst] How to de-serialize json?

2010-01-27 Thread Tomas Doran
On 28 Jan 2010, at 00:14, Bill Moseley wrote: Or that an application might want the raw json? Or that one app depends on JSON::XS doing the decoding whilst one depends on JSON.pm.. Cheers t0m ___ List: Catalyst@lists.scsys.co.uk Listinfo:

Re: [Catalyst] How to de-serialize json?

2010-01-27 Thread Hans Dieter Pearcey
Excerpts from Bill Moseley's message of Wed Jan 27 19:14:29 -0500 2010: 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

Re: [Catalyst] How to de-serialize json?

2010-01-27 Thread J. Shirley
On Wed, Jan 27, 2010 at 4:14 PM, Bill Moseley mose...@hank.org wrote: 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

Re: [Catalyst] How to de-serialize json?

2010-01-26 Thread Zbigniew Lukasiak
On Sun, Jan 24, 2010 at 8:01 AM, Bill Moseley mose...@hank.org wrote: On Sat, Jan 23, 2010 at 7:20 PM, Hans Dieter Pearcey hdp.perl.catalyst.us...@weftsoar.net wrote: As far as I can tell, you missed the point of my message, which makes me wonder if I've missed the point of yours.  Are you

Re: [Catalyst] How to de-serialize json?

2010-01-26 Thread J. Shirley
On Tue, Jan 26, 2010 at 1:49 AM, Zbigniew Lukasiak zzb...@gmail.com wrote: On Sun, Jan 24, 2010 at 8:01 AM, Bill Moseley mose...@hank.org wrote: On Sat, Jan 23, 2010 at 7:20 PM, Hans Dieter Pearcey hdp.perl.catalyst.us...@weftsoar.net wrote: As far as I can tell, you missed the point of my

Re: [Catalyst] How to de-serialize json?

2010-01-26 Thread Tomas Doran
Zbigniew Lukasiak wrote: I cannot claim to understand all the concerns here - but to add my two cents: it sounds like this deserialisation thing is not something specific to Catalyst and now with other frameworks and libraries gaining grounds - it would make sense to put that logic into

Re: [Catalyst] How to de-serialize json?

2010-01-24 Thread Bill Moseley
On Sat, Jan 23, 2010 at 7:20 PM, Hans Dieter Pearcey hdp.perl.catalyst.us...@weftsoar.net wrote: As far as I can tell, you missed the point of my message, which makes me wonder if I've missed the point of yours. Are you talking about a set of conventions you'd like to be able to build for

[Catalyst] How to de-serialize json?

2010-01-23 Thread Bill Moseley
Following up on our recent simulating discussion on adding an API to an application, I wonder is someone can help me understand something: Catalyst uses HTTP::Body to parse body content. It currently handles these request content types: our $TYPES = { 'application/octet-stream' =

Re: [Catalyst] How to de-serialize json?

2010-01-23 Thread J. Shirley
On Sat, Jan 23, 2010 at 10:16 AM, Bill Moseley mose...@hank.org wrote: Following up on our recent simulating discussion on adding an API to an application, I wonder is someone can help me understand something: Catalyst uses HTTP::Body to parse body content.  It currently handles these request

Re: [Catalyst] How to de-serialize json?

2010-01-23 Thread Bill Moseley
On Sat, Jan 23, 2010 at 1:40 PM, J. Shirley jshir...@gmail.com wrote: If I assume that decoding is synonymous with de-serialization, it makes more sense. At first thought, I just don't think they're that similar, though. Maybe in implementations (comparing JSON to HTTP POST parameters) it

Re: [Catalyst] How to de-serialize json?

2010-01-23 Thread Hans Dieter Pearcey
Excerpts from Bill Moseley's message of Sat Jan 23 19:45:28 -0500 2010: On Sat, Jan 23, 2010 at 1:40 PM, J. Shirley jshir...@gmail.com wrote: If I assume that decoding is synonymous with de-serialization, it makes more sense. At first thought, I just don't think they're that similar,

Re: [Catalyst] How to de-serialize json?

2010-01-23 Thread Bill Moseley
On Sat, Jan 23, 2010 at 5:39 PM, Hans Dieter Pearcey hdp.perl.catalyst.us...@weftsoar.net wrote: Excerpts from Bill Moseley's message of Sat Jan 23 19:45:28 -0500 2010: With a jpeg I assume the content type would be form-data (that included an upload in the form) where the file ends up in

Re: [Catalyst] How to de-serialize json?

2010-01-23 Thread Hans Dieter Pearcey
Excerpts from Bill Moseley's message of Sat Jan 23 21:47:00 -0500 2010: On Sat, Jan 23, 2010 at 5:39 PM, Hans Dieter Pearcey hdp.perl.catalyst.us...@weftsoar.net wrote: Excerpts from Bill Moseley's message of Sat Jan 23 19:45:28 -0500 2010: With a jpeg I assume the content type would