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