Create a controller and a empty theme page
Controllers must return a response (you will get an error if you don't). Your options are to return a render array, an HtmlResponse, a JsonResponse, or an AjaxResponse. 

Edit: Or as Kevin posted below, a Response.

By the sounds of it, you are wanting to return JSON, so JsonResponse is likely what you are looking for.