1
[JsonProperty(PropertyName = "orderCode")] // 直接为属性赋值
2
[JsonProperty(propertyName: "orderCode")] // 为构造方法的参数赋值
public sealed class JsonPropertyAttribute : Attribute
{
// 如果构造方法没有任何参数,则只能用 " = " 号的形式直接为属性赋值
public JsonPropertyAttribute();
// 使用" : " 冒号 是调用有参数的构造方法
public JsonPropertyAttribute(string propertyName);
public string PropertyName { get; set; }
}