I'm using MVC Controller. Json method in order to send json result object to my javascript function.
From time to time I want to omit one of my object's property from the json result object.
How can I achive it?
This is my .NET object:
public class jsTreeModel
{
public string Data { get; set; }
public JsTreeAttribute Att { get; set; }
public string State { get; set; }
public List<jsTreeModel> Children { get; set; }
}
I this case I want to omit the 'Children' property from the json result.
Any idea?