[Fwd: Re: [Repoze-dev] obob example...]
Mike Naberezny
mike at maintainable.com
Wed Sep 12 03:17:38 UTC 2007
Chris McDonough wrote:
> Any method can return a Python structure and
> if we can serialize to something we'll try to based on metadata in the
> request (as opposed to traversing to a separate method).
OK, that's what I originally understood also, just checking.
> I'll try to investigate a little. It'd be trivial to add json
> serialization to obob if we could figure out how to decide when to do it.
I don't have any particular interest in JSON, that was just an example. If
you do get into implementing it...
if (fs.headers.has_key('content-type') and
'text/xml' in fs.headers['content-type'] and
method == 'POST'):
# Ye haaa, XML-RPC!
Maybe some of the coupling such as this stuff from HTTPRequest#processInputs
could be factored out so the request is processed with an intercepting filter
pattern.
Each member of the chain would be given an opportunity to analyze the request,
and the first one to halt the chain handles the marshaling. This way we could
plug in JSON or whatever else comes along by registering a new one with obob.
Mike
--
Mike Naberezny
Maintainable Software
http://maintainable.com
_______________________________________________
Repoze-dev mailing list
Repoze-dev at lists.repoze.org
http://lists.repoze.org/mailman/listinfo/repoze-dev
More information about the Repoze-dev
mailing list