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