【优化】cfg 导出json格式数据时,object类型不再导出值为null的属性
parent
6003ec95f0
commit
ef6524626e
|
|
@ -111,14 +111,15 @@ namespace Luban.Job.Cfg.DataExporters
|
|||
continue;
|
||||
}
|
||||
|
||||
x.WritePropertyName(defField.Name);
|
||||
// 特殊处理 bean 多态类型
|
||||
// 另外,不生成 xxx:null 这样
|
||||
if (d == null || (d is DBean db && db.ImplType == null))
|
||||
{
|
||||
x.WriteNullValue();
|
||||
//x.WriteNullValue();
|
||||
}
|
||||
else
|
||||
{
|
||||
x.WritePropertyName(defField.Name);
|
||||
d.Apply(this, ass, x);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue