Use a base view for method views.
Jsonify response in `endpoint` decorator.