Howdy, I'm using the jsonify decorator. It'd be nice if that decorator were updated to *automatically* support the jsonp parameter <http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp/>. Hence, if I request a URL like <http://localhost:5000/api/service?jsonp=foo>, and jsonify is used, it should automatically wrap the JSON in foo().
It might also make sense to support a parameter named jsonprettyprint that, if set, turns on pretty printing of the JSON. This second feature would be nice, but it's less important. I have the following in my code: # This is probably evil, but it makes it a lot easier to debug things. import simplejson simplejson._default_encoder.indent = 2 simplejson._default_encoder.sort_keys = True I realized that if I turn on gzip, then it doesn't really matter whether I pretty print or not (the size difference is something like 1%). I have pretty printing permanently turned on because it makes it a lot easier to debug things. Best Regards, -jj -- I, for one, welcome our new Facebook overlords! http://jjinux.blogspot.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
