Web services are those services which are available over web to communicate between systems.
By default Web Service returns data in XML format, now if the requirement is to return in JSON format then we need to do modification in web method.
Below webmethod returns data in JSON format.
Read this - What is Microservice Architecture?
Related Blogs –
- Web Services, SOAP and RESTful Services
- Get JSON data in Web Service
- How to create a secure Web Service?
- How to overload a web method in Web Service?
- Web Service in InfoPathForm – SharePoint 2010