标签: json serialization .net-core
使用新的.NET Core 3.0 JSON序列化程序进行序列化时,是否可以忽略某些NULL字段?
class MyData { int? a; // always serialized int? b; // serialized only when not NULL }
(使用Newtonsoft,我可以选择编写字段绑定函数,其中包括自定义逻辑来决定是否要序列化特定字段。)