The ASP.NET web service returns the default XML / SOAP message. If you want to return a Json string, you will need to decorate the web service with the [ScriptService] attribute. This tells IIS that this service will be used by ASP.NET AJAX calls. These attributes are part of System.Web.Extensions.
You can define the response format of the web method by decorating the web method with the ScriptMethod attribute.
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
However, even after the web service and the web method are formatted with this attribute, the response can still be in XML format. This behavior occurs when the client that makes the request does not set the content type of the request header to "application / json".
Before returning, the method call from webmethod is serialized to a Json string using JavaScriptSerializer
Debugging a WebService Using Fiddler
It is very easy to use a violinist to test webservice. The next digit is an example of a Webservice call that returns a json string. Note that the request content type is set to application / json. The parameters expected by webserivce are referenced in the Request Body section. 
Note that the request content type is set to application / json.
Amit rai sharma
source share