Artifact 25f5fba8a26bceaa44d621fe3f1edb0fb1001f32:
- File applications/examples/views/generic.json — part of check-in [eba4a35a21] at 2011-08-08 04:53:38 on branch develop — Added web2py 1.98.2 (user: spiffy, size: 412) [annotate] [blame] [check-ins using]
{{ ### # response._vars contains the dictionary returned by the controller action ### try: from gluon.serializers import json response.write(json(response._vars), escape=False) response.headers['Content-Type'] = 'application/json' except (TypeError, ValueError): raise HTTP(405, 'JSON serialization error') except ImportError: raise HTTP(405, 'JSON not available') except: raise HTTP(405, 'JSON error') }}