refactor: 注解与宏改名——Serializer 前缀统一命名

- @JsonPropertyName → @SerializerPropertyName
- @JsonIgnore → @SerializerIgnore
- @JsonParent → @SerializerParent(宏文件 JsonParentMacro.cj → SerializerParentMacro.cj)
- 同步更新:JsonAnnotations、ReflectionCache、宏内部注解判断、
  测试、方案文档、serialization_test 独立项目
- 16 用例全绿
This commit is contained in:
2026-08-17 13:58:05 +08:00
parent affadac6c2
commit 990f10f98c
9 changed files with 77 additions and 77 deletions
+2 -2
View File
@@ -106,14 +106,14 @@ public class JsonWriter {
// 1) 子类自身字段(反射)
let fields = ReflectionCache.getFields(ct, options)
for (f in fields) {
// 只要不是 @JsonIgnore 的字段一律输出;None 字段输出 null
// 只要不是 @SerializerIgnore 的字段一律输出;None 字段输出 null
if (f.ignore) {
continue
}
let raw = f.variable.getOrThrow().getValue(value)
obj.put(f.jsonName, writeValue(raw, options, depth + 1))
}
// 2) 父类字段(@JsonParent 宏生成的静态导出方法,沿继承链逐层调用)
// 2) 父类字段(@SerializerParent 宏生成的静态导出方法,沿继承链逐层调用)
writeParentFields(value, ct, obj, options, depth)
obj
}