title: get JSON from ASP.NET web service ASMX file
body: <p>I'm creating a web service using ASP.NET, C#, currently it is giving XML, but I'm going to get JSON, this is how I create my webmtheod:</p>
  
  <pre><code>[Webservice(Namespace="http://myurl)]
  [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfiles_1)]
  [System.ComponentModel.ToolboxItem(false)]
  
  [WebMehod]
  public string myfunction()
  {
  
  string r = "......";
  
  
  return r;
  }
  </code></pre>
  
  <p>these are in an ASMX file, which I call it in my browser</p>