📜  如何设置属性以忽略空值json c# - Javascript代码示例

📅  最后修改于: 2022-03-11 15:03:24.183000             🧑  作者: Mango

代码示例1
[JsonProperty(NullValueHandling=NullValueHandling.Ignore)]
// or
[JsonProperty("property_name", NullValueHandling=NullValueHandling.Ignore)]

// or for all properties in a class
[JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)]