refactor: 源文件名改为蛇形命名(simapi_serialization/annotations/json_serializer 等), 消除 cjlint G.NAM.02 警告, 版本号 1.2.1

This commit is contained in:
2026-08-25 12:01:24 +08:00
parent cd1b56fb81
commit bf940215b7
12 changed files with 12 additions and 12 deletions
+11 -11
View File
@@ -19,14 +19,14 @@ SimApi 全反射 JSON 序列化库(仓颉版),对齐 .NET `System.Text.Jso
```toml
[dependencies]
"simcu::serialization" = "1.2.0"
"simcu::serialization" = "1.2.1"
```
**方式二:Git 仓库**
```toml
[dependencies]
"simcu::serialization" = { git = "https://gitcode.com/simcu/serialization-cj.git", version = "1.2.0" }
"simcu::serialization" = { git = "https://gitcode.com/simcu/serialization-cj.git", version = "1.2.1" }
```
> 本地开发也可用 path 依赖:`"simcu::serialization" = { path = "../simapi-serialization" }`
@@ -227,19 +227,19 @@ JSON 数字 ↔ 字符串字段自动互转:`deserialize<String>("42")` → `"
```
src/
├── SimApiSerialization.cj // 根锚点:public import common.* + json.*
├── simapi_serialization.cj // 根锚点:public import common.* + json.*
├── common/ // XML/JSON 共用
│ ├── Annotations.cj // @PropertyName / @Ignore / @NotRequired
│ ├── ReflectionCache.cj // 字段元数据 + 继承链缓存
│ └── NamingPolicy.cj // PropertyNamingPolicy
│ ├── annotations.cj // @PropertyName / @Ignore / @NotRequired
│ ├── reflection_cache.cj // 字段元数据 + 继承链缓存
│ └── naming_policy.cj // PropertyNamingPolicy
├── json/ // JSON 序列化
│ ├── JsonSerializer.cj // 公开 API(含 TypeInfo 版 deserialize)
│ ├── JsonWriter.cj / JsonReader.cj
│ └── JsonOption.cj
│ ├── json_serializer.cj // 公开 API(含 TypeInfo 版 deserialize)
│ ├── json_writer.cj / json_reader.cj
│ └── json_option.cj
├── macros/ // @SerializerParent 宏
│ └── SerializerParentMacro.cj
│ └── serializer_parent_macro.cj
└── tests/ // 单元测试(独立子包)
└── JsonSerializer_test.cj // cjpm test,21 用例
└── json_serializer_test.cj // cjpm test,21 用例
```
## 测试