I have a Windows service which is serving for http request. The service is having hardcoded switch case which should choose different case based on the input passed to it. Now I need to enhance the service to handle a new request. But the new request also follows one of the existing switch case. So whenever new request to be supported, the logic needs to be enhanced to add the new request type. Instead I want to have this mapping in a configuration file, so that the logic need not be changed for new enhancement.
I know it can be done in XML or JSON. Is there any modern ways for handling configuration files?