deprecate renderJSON and make it easier to return a json response

Allows developers to get rid of JSON constructs for error messages, makes it easier to return JSON responses and deprecates old methods, but keeps backwards compability

cc @tanghus @DeepDiver1975 @butonic @kabum