Move JsonController to trait