如何将属性标记为不可序列化的JSON? [英] How to mark a property as non serializable for json?

查看:262
本文介绍了如何将属性标记为不可序列化的JSON?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如标题所述,我想将一个属性标记为JavascriptSerializer不可序列化.怎么能做到呢?预先感谢.

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

推荐答案

认为您只想应用

I think you just want to apply the ScriptIgnoreAttribute:

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

这篇关于如何将属性标记为不可序列化的JSON?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆