How to mark a property as non serializable for json?

前端 未结 3 1876
悲哀的现实
悲哀的现实 2021-02-07 07:44

As the title says, I want to mark a property as non serializable by the JavascriptSerializer. How can achive that ? Thanks in advance.

3条回答
  •  半阙折子戏
    2021-02-07 08:05

    I think you just want to apply the ScriptIgnoreAttribute:

    [ScriptIgnore]
    public string IgnoreThis { get; set; }
    

提交回复
热议问题