Add the dispatcher into a check to see if JSON_REQUEST is defined.