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 ```toml
[dependencies] [dependencies]
"simcu::serialization" = "1.2.0" "simcu::serialization" = "1.2.1"
``` ```
**方式二:Git 仓库** **方式二:Git 仓库**
```toml ```toml
[dependencies] [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" }` > 本地开发也可用 path 依赖:`"simcu::serialization" = { path = "../simapi-serialization" }`
@@ -227,19 +227,19 @@ JSON 数字 ↔ 字符串字段自动互转:`deserialize<String>("42")` → `"
``` ```
src/ src/
├── SimApiSerialization.cj // 根锚点:public import common.* + json.* ├── simapi_serialization.cj // 根锚点:public import common.* + json.*
├── common/ // XML/JSON 共用 ├── common/ // XML/JSON 共用
│ ├── Annotations.cj // @PropertyName / @Ignore / @NotRequired │ ├── annotations.cj // @PropertyName / @Ignore / @NotRequired
│ ├── ReflectionCache.cj // 字段元数据 + 继承链缓存 │ ├── reflection_cache.cj // 字段元数据 + 继承链缓存
│ └── NamingPolicy.cj // PropertyNamingPolicy │ └── naming_policy.cj // PropertyNamingPolicy
├── json/ // JSON 序列化 ├── json/ // JSON 序列化
│ ├── JsonSerializer.cj // 公开 API(含 TypeInfo 版 deserialize) │ ├── json_serializer.cj // 公开 API(含 TypeInfo 版 deserialize)
│ ├── JsonWriter.cj / JsonReader.cj │ ├── json_writer.cj / json_reader.cj
│ └── JsonOption.cj │ └── json_option.cj
├── macros/ // @SerializerParent 宏 ├── macros/ // @SerializerParent 宏
│ └── SerializerParentMacro.cj │ └── serializer_parent_macro.cj
└── tests/ // 单元测试(独立子包) └── tests/ // 单元测试(独立子包)
└── JsonSerializer_test.cj // cjpm test,21 用例 └── json_serializer_test.cj // cjpm test,21 用例
``` ```
## 测试 ## 测试
+1 -1
View File
@@ -3,7 +3,7 @@ cjc-version = "1.1.3"
name = "serialization" name = "serialization"
organization = "simcu" organization = "simcu"
description = "SimApi 全反射 JSON 序列化库" description = "SimApi 全反射 JSON 序列化库"
version = "1.2.0" version = "1.2.1"
target-dir = "" target-dir = ""
output-type = "static" output-type = "static"