I think so. If not you could just wrap it in a function and return the json.