C#列表定义中的冒号

C#列表定义中的冒号,c#,json.net,C#,Json.net,我必须反序列化根对象名中包含冒号的JSON对象数组 有人知道我是否可以在列表定义中使用冒号来实现这一点吗 public List<Customers> ngcp:customers { get; set; } 公共列表ngcp:customers{get;set;} 否,正确的方法是使用json.net支持的属性或其他方法指定名称 [JsonProperty(PropertyName = "ngcp:customers")] public List<Customers>

我必须反序列化根对象名中包含冒号的JSON对象数组

有人知道我是否可以在列表定义中使用冒号来实现这一点吗

public List<Customers> ngcp:customers { get; set; }
公共列表ngcp:customers{get;set;}

否,正确的方法是使用json.net支持的属性或其他方法指定名称

[JsonProperty(PropertyName = "ngcp:customers")]
public List<Customers> Customers { get; set; }
[JsonProperty(PropertyName=“ngcp:customers”)]
公共列表客户{get;set;}

不,正确的方法是使用json.net支持的属性或其他方法指定名称

[JsonProperty(PropertyName = "ngcp:customers")]
public List<Customers> Customers { get; set; }
[JsonProperty(PropertyName=“ngcp:customers”)]
公共列表客户{get;set;}

谢谢,您能帮我收集ngcp:customers的物品吗?我想获得该集合中的每个对象,并将其用于datagrid:谢谢,您能帮我完成ngcp:customers的对象集合吗?我想获取该集合中的每个对象,并将其用于datagrid: