refactor: 移除 ignoreNull 选项——非 @JsonIgnore 字段一律输出,None 输出 null
- JsonOption 删除 ignoreNull - JsonWriter.writeObject 不再按 null 跳过字段(只跳过 @JsonIgnore) - 删除不再使用的 isNoneValue - 测试:remark(None)→null 且保留;temp(@JsonIgnore) 唯一被排除
This commit is contained in:
@@ -24,9 +24,6 @@ public class JsonOption {
|
||||
/// 属性命名策略(默认 CamelCase)
|
||||
public var propertyNamingPolicy: PropertyNamingPolicy = PropertyNamingPolicy.CamelCase
|
||||
|
||||
/// 序列化时是否忽略 null/None 字段(默认 false:None 输出 null)
|
||||
public var ignoreNull: Bool = false
|
||||
|
||||
/// 枚举序列化为名字(默认 true;false 暂按名字输出,数字模式后续支持)
|
||||
public var enumAsString: Bool = true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user