> import simplejson
> json_obj = {'foo', 'bar'}
> return simplejson.dumps(json_obj)
> etc...
Or even simpler (at least in 0.9.6.2 - not sure if this still stands
with newer versions)
from pylons.decoraters import jsonify
class TestController(BaseController):
@jsonify
def testaction(self):
return {'foo','bar':4711}
Regards,
Jens
--
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.