create a route and controller for rendering json objects