make /package/foo?json return JSON template context as a JSON object

Is there a particular reason you don't want to do `request.query.json` instead of `Object.keys(request.query).indexOf('json') > -1`?