ASP.NET Webmethod/webservices remove __type property from JSON response

Just add protected internal ClassName(){} constructor

public class TempDealer
{
	public int Id { get; set; }
	public string Name { get; set; }
	protected internal TempDealer() { } //add a protected internal constructor to remove the returned __type attribute in the JSON response
}

Source: Stack Overflow

Leave a Reply

Your email address will not be published. Required fields are marked *