> Jsonify is only ten lines or so. You can copy it and add this > feature. It's too specific for Pylons though. (What would the config > variable be, 'jsonify_content_type'?)
I disagree that its too specific. It's a change that would make it easier for developers to test jsonify content in their browser, without having to use firefox with a special plugin -- which is what people currently have to do. I think making things easier for a general audience of Pylons developers to code & test is good. I don't need this personally. I use a library function to create structured dicts that are turned into JSON , and put this functionality in there. But I do think it is of benefit to others. And yes, I was thinking of a change like this : - pylons.response.headers['Content-Type'] = 'application/json' + if 'pylons.jsonify_content_type' in pylons.config: + pylons.response.headers['Content-Type'] = pylons.config ['pylons.jsonify_content_type'] + else: + pylons.response.headers['Content-Type'] = 'application/json' --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
