diff --git a/README.md b/README.md index beb99e7..40bc98f 100644 --- a/README.md +++ b/README.md @@ -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("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 用例 ``` ## 测试 diff --git a/cjpm.toml b/cjpm.toml index 2196452..7609fee 100644 --- a/cjpm.toml +++ b/cjpm.toml @@ -3,7 +3,7 @@ cjc-version = "1.1.3" name = "serialization" organization = "simcu" description = "SimApi 全反射 JSON 序列化库" -version = "1.2.0" +version = "1.2.1" target-dir = "" output-type = "static" diff --git a/src/common/Annotations.cj b/src/common/annotations.cj similarity index 100% rename from src/common/Annotations.cj rename to src/common/annotations.cj diff --git a/src/common/NamingPolicy.cj b/src/common/naming_policy.cj similarity index 100% rename from src/common/NamingPolicy.cj rename to src/common/naming_policy.cj diff --git a/src/common/ReflectionCache.cj b/src/common/reflection_cache.cj similarity index 100% rename from src/common/ReflectionCache.cj rename to src/common/reflection_cache.cj diff --git a/src/json/JsonOption.cj b/src/json/json_option.cj similarity index 100% rename from src/json/JsonOption.cj rename to src/json/json_option.cj diff --git a/src/json/JsonReader.cj b/src/json/json_reader.cj similarity index 100% rename from src/json/JsonReader.cj rename to src/json/json_reader.cj diff --git a/src/json/JsonSerializer.cj b/src/json/json_serializer.cj similarity index 100% rename from src/json/JsonSerializer.cj rename to src/json/json_serializer.cj diff --git a/src/json/JsonWriter.cj b/src/json/json_writer.cj similarity index 100% rename from src/json/JsonWriter.cj rename to src/json/json_writer.cj diff --git a/src/macros/SerializerParentMacro.cj b/src/macros/serializer_parent_macro.cj similarity index 100% rename from src/macros/SerializerParentMacro.cj rename to src/macros/serializer_parent_macro.cj diff --git a/src/SimApiSerialization.cj b/src/simapi_serialization.cj similarity index 100% rename from src/SimApiSerialization.cj rename to src/simapi_serialization.cj diff --git a/src/tests/JsonSerializer_test.cj b/src/tests/json_serializer_test.cj similarity index 100% rename from src/tests/JsonSerializer_test.cj rename to src/tests/json_serializer_test.cj