Return JSON rather than HTML.

This will allow us to craft elements client-side and inject them into DOM.