如何使用json.net忽略类中的属性(如果为NULL)
class Test1{
[JsonProperty("id")]
public string ID { get; set; }
[JsonProperty("label")]
public string Label { get; set; }
[JsonProperty("url")]
public string URL { get; set; }
[JsonProperty("item")]
public List<Test2> Test2List { get; set; }}JsonIgnore()Test2ListTest2Listnull
一只萌萌小番薯
慕标琳琳
长风秋雁
随时随地看视频慕课网APP
相关分类