How to mark a property as non serializable for json?
If you are needing this for ASP.NET Core
or even before that, you should be using:
[JsonIgnore]
you'll need to reference:
using Newtonsoft.Json;
I think you just want to apply the ScriptIgnoreAttribute
:
[ScriptIgnore]
public string IgnoreThis { get; set; }