On Thu, Jul 29, 2010 at 10:47 PM, Daniel Fetchinson firstname.lastname@example.org wrote:
Have a look at turbojson , the jsonification package that uses peak.rules  and which comes with turbogears . It does exactly what you propose.
Speaking of PJE and generic functions* ;)
*For those following along at home that may not be familiar with the names of various Python developers, PJE is Phillip J. Eby, the author of peak.rules (amongst many other things).