我正在将我的 .net 核心 2.1 转换为 3.0,并从 newtonsoft 升级到内置 JSON 序列化程序。
我有一些设置默认值的代码
[DefaultValue(true)]
[JsonProperty("send_service_notification", DefaultValueHandling = DefaultValueHandling.Populate)]
public bool SendServiceNotification { get; set; }
请帮助我解决 System.Text.Json.Serialization 中的等效问题。