Changed view to always return json.