I have been able to active json extension in Cakephp 3.3 where by only adding .json to the end of controller url it will return a json response. However right now it does this for every function in every controller. Is there a way to specify that it only be done for a certain controller or even a specific function. I've gone through the Cakephp 3.x cookbook and there's no mention of how to implement this anywhere. Right now the only way I think this can be done is to stop using the extension entirely and just make a json encoded function but this would be against best practices. Any help at all would be greatly appreciated.