在 JsonProperty 上设置属性名称和空值处理

MAK*_*MAK 0 c# json.net

我的属性设置如下:

[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public string TId { get; set; }
Run Code Online (Sandbox Code Playgroud)

我还希望能够确保这是驼峰式的。

[JsonProperty("tId")]
public string TId { get; set; }
Run Code Online (Sandbox Code Playgroud)

我怎样才能将这些合而为一?

Ser*_*sin 5

[JsonProperty(PropertyName = "tId", NullValueHandling = NullValueHandling.Ignore)]
public string TId { get; set; }
Run Code Online (Sandbox Code Playgroud)