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

@neonstalwart Not sure what you mean?