Handle json objects both from Ruby and on client-side
Change content header in the view.