views: Add a json response class

Issue #266.
Use JSON response for /s.json requests

Issue #266.
Use JSON response for /r/:id.json requests

Issue #266.
Merge branch 'issue/266'