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
> not be mapped to request parameters.  Is that what you mean?  Or that an
> application might want the raw json?
>

I actually have two applications that expect and need the raw data,
rather than the serialized response.

In one case, it's a simple relay mechanism (unreliable system POSTs
JSON feed, and reliable system then rebroadcasts it) similar to a
pubsub model.  It is much faster to just relay the data rather than
deserialize.

Another case, storing the data in something like MogileFS.  I don't
necessarily want to deserialize it but I do need the mime-type from
the uploads.  I tend to be the type that store data as I receive it,
then clean it separately as needed.

Half-way contrived examples, but based off of real world stuff I have
done/am doing.

-J

_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to