This is an automated email from the ASF dual-hosted git repository. chaokunyang pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/fory-site.git
commit 91b766ba9654a3bcfcdede6de452dfc6b7d970d8 Author: chaokunyang <[email protected]> AuthorDate: Wed May 27 07:22:55 2026 +0000 ๐ synced local 'docs/guide/' with remote 'docs/guide/' --- docs/guide/csharp/basic-serialization.md | 8 ++++---- docs/guide/csharp/custom-serializers.md | 4 ++-- docs/guide/csharp/index.md | 6 +++--- docs/guide/csharp/references.md | 2 +- docs/guide/csharp/schema-evolution.md | 4 ++-- docs/guide/csharp/schema-metadata.md | 8 ++++---- docs/guide/csharp/supported-types.md | 2 +- docs/guide/csharp/xlang-serialization.md | 2 +- docs/guide/dart/xlang-serialization.md | 2 +- docs/guide/go/type-registration.md | 4 ++-- docs/guide/python/xlang-serialization.md | 4 ++-- 11 files changed, 23 insertions(+), 23 deletions(-) diff --git a/docs/guide/csharp/basic-serialization.md b/docs/guide/csharp/basic-serialization.md index a7a7edffb0..d112990ccd 100644 --- a/docs/guide/csharp/basic-serialization.md +++ b/docs/guide/csharp/basic-serialization.md @@ -23,19 +23,19 @@ This page covers typed serialization APIs in Apache Foryโข C#. ## Object Graph Serialization -Use `[ForyObject]` on your classes/structs and register them before use. +Use `[ForyStruct]` on your classes/structs and register them before use. ```csharp using Apache.Fory; -[ForyObject] +[ForyStruct] public sealed class Address { public string Street { get; set; } = string.Empty; public int Zip { get; set; } } -[ForyObject] +[ForyStruct] public sealed class Person { public long Id { get; set; } @@ -122,7 +122,7 @@ fory.Serialize<object?>(dynamicWriter, value); - Reuse the same `Fory` or `ThreadSafeFory` instance for better performance. - Primitive types and collections do not require user registration. -- User `[ForyObject]` and custom serializer types should be registered explicitly. +- User `[ForyStruct]`, `[ForyEnum]`, `[ForyUnion]`, and custom serializer types should be registered explicitly. ## Related Topics diff --git a/docs/guide/csharp/custom-serializers.md b/docs/guide/csharp/custom-serializers.md index 164a32a48c..9e7ef768f3 100644 --- a/docs/guide/csharp/custom-serializers.md +++ b/docs/guide/csharp/custom-serializers.md @@ -19,7 +19,7 @@ license: | limitations under the License. --- -Use custom serializers when a type is not generated with `[ForyObject]` or requires specialized encoding. +Use custom serializers when a type is not generated with `[ForyStruct]` or requires specialized encoding. ## Implement `Serializer<T>` @@ -75,7 +75,7 @@ Point decoded = fory.Deserialize<Point>(payload); 1. Keep serializers deterministic and symmetric. 2. Use varint/fixed/tagged encoding intentionally for integer-heavy payloads. 3. Register custom serializers on all reader/writer peers. -4. Prefer generated `[ForyObject]` serializers for normal domain models. +4. Prefer generated `[ForyStruct]` serializers for normal domain models. ## Related Topics diff --git a/docs/guide/csharp/index.md b/docs/guide/csharp/index.md index 9fbb06b018..1b556091b9 100644 --- a/docs/guide/csharp/index.md +++ b/docs/guide/csharp/index.md @@ -26,7 +26,7 @@ Apache Foryโข C# is a high-performance, cross-language serialization runtime fo - High performance binary serialization for .NET 8+ - Xlang compatibility with Fory implementations in Java, Python, C++, Go, Rust, JavaScript/TypeScript, Swift, Dart, Scala, and Kotlin -- Source-generator-based serializers for `[ForyObject]` types +- Source-generator-based serializers for `[ForyStruct]` types, plus `[ForyEnum]` and `[ForyUnion]` registration - Optional reference tracking for shared and circular object graphs - Compatible mode for schema evolution - Thread-safe runtime (`ThreadSafeFory`) for multi-threaded services @@ -40,7 +40,7 @@ Apache Foryโข C# is a high-performance, cross-language serialization runtime fo ### Install from NuGet -Reference the single `Apache.Fory` package. It includes the runtime and the source generator for `[ForyObject]` types. +Reference the single `Apache.Fory` package. It includes the runtime and the source generator for `[ForyStruct]`, `[ForyEnum]`, and `[ForyUnion]` types. ```xml <ItemGroup> @@ -53,7 +53,7 @@ Reference the single `Apache.Fory` package. It includes the runtime and the sour ```csharp using Apache.Fory; -[ForyObject] +[ForyStruct] public sealed class User { public long Id { get; set; } diff --git a/docs/guide/csharp/references.md b/docs/guide/csharp/references.md index 1420be04fa..772b2535ca 100644 --- a/docs/guide/csharp/references.md +++ b/docs/guide/csharp/references.md @@ -39,7 +39,7 @@ When enabled: ```csharp using Apache.Fory; -[ForyObject] +[ForyStruct] public sealed class Node { public int Value { get; set; } diff --git a/docs/guide/csharp/schema-evolution.md b/docs/guide/csharp/schema-evolution.md index 10efda0272..108634b773 100644 --- a/docs/guide/csharp/schema-evolution.md +++ b/docs/guide/csharp/schema-evolution.md @@ -36,13 +36,13 @@ Compatible mode writes type metadata that allows readers and writers with differ ```csharp using Apache.Fory; -[ForyObject] +[ForyStruct] public sealed class OneStringField { public string? F1 { get; set; } } -[ForyObject] +[ForyStruct] public sealed class TwoStringField { public string F1 { get; set; } = string.Empty; diff --git a/docs/guide/csharp/schema-metadata.md b/docs/guide/csharp/schema-metadata.md index 3941a3824d..37ebd33a76 100644 --- a/docs/guide/csharp/schema-metadata.md +++ b/docs/guide/csharp/schema-metadata.md @@ -21,15 +21,15 @@ license: | This page covers field-level serializer configuration for C# generated serializers. -## `[ForyObject]` and `[ForyField]` +## `[ForyStruct]` and `[ForyField]` -Use `[ForyObject]` to enable source-generated serializers. Use `[ForyField]` to assign an optional stable non-negative field id or to override the Fory schema type used for a field. +Use `[ForyStruct]` to enable source-generated serializers. Use `[ForyField]` to assign an optional stable non-negative field id or to override the Fory schema type used for a field. ```csharp using Apache.Fory; using S = Apache.Fory.Schema.Types; -[ForyObject] +[ForyStruct] public sealed class Metrics { [ForyField(Type = typeof(S.UInt32))] @@ -48,7 +48,7 @@ public sealed class Metrics using Apache.Fory; using S = Apache.Fory.Schema.Types; -[ForyObject] +[ForyStruct] public sealed class NestedMetrics { [ForyField(Type = typeof(S.Map<S.Fixed<S.UInt32>, S.List<S.Tagged<S.UInt64>>>))] diff --git a/docs/guide/csharp/supported-types.md b/docs/guide/csharp/supported-types.md index fed11cd457..e93b592216 100644 --- a/docs/guide/csharp/supported-types.md +++ b/docs/guide/csharp/supported-types.md @@ -76,7 +76,7 @@ This page summarizes built-in and generated type support in Apache Foryโข C#. ## User Types -- `[ForyObject]` classes/structs/enums via source-generated serializers +- `[ForyStruct]` classes/structs via source-generated serializers, plus `[ForyEnum]` enums and `[ForyUnion]` union subclasses - Custom serializer types registered through `Register<T, TSerializer>(...)` - `Union` / `Union2<...>` typed union support diff --git a/docs/guide/csharp/xlang-serialization.md b/docs/guide/csharp/xlang-serialization.md index 3c53e52af3..d47b44dedb 100644 --- a/docs/guide/csharp/xlang-serialization.md +++ b/docs/guide/csharp/xlang-serialization.md @@ -36,7 +36,7 @@ Fory fory = Fory.Builder() ## Register with Stable IDs ```csharp -[ForyObject] +[ForyStruct] public sealed class Person { public string Name { get; set; } = string.Empty; diff --git a/docs/guide/dart/xlang-serialization.md b/docs/guide/dart/xlang-serialization.md index 38ec6dc090..b8d5d28110 100644 --- a/docs/guide/dart/xlang-serialization.md +++ b/docs/guide/dart/xlang-serialization.md @@ -112,7 +112,7 @@ final bytes = fory.serialize(Person() ### CSharp ```csharp -[ForyObject] +[ForyStruct] public sealed class Person { public string Name { get; set; } = string.Empty; diff --git a/docs/guide/go/type-registration.md b/docs/guide/go/type-registration.md index 452cdb5be9..d651fb1a9b 100644 --- a/docs/guide/go/type-registration.md +++ b/docs/guide/go/type-registration.md @@ -214,9 +214,9 @@ fory.register(User, typename="example.User") **Rust**: ```rust -use fory::{Fory, ForyObject}; +use fory::{Fory, ForyStruct}; -#[derive(ForyObject)] +#[derive(ForyStruct)] struct User { id: i64, name: String, diff --git a/docs/guide/python/xlang-serialization.md b/docs/guide/python/xlang-serialization.md index cf1bd19b56..a16da3b7b7 100644 --- a/docs/guide/python/xlang-serialization.md +++ b/docs/guide/python/xlang-serialization.md @@ -79,9 +79,9 @@ Person person = (Person) fory.deserialize(binaryData); ```rust use fory::Fory; -use fory::ForyObject; +use fory::ForyStruct; -#[derive(ForyObject)] +#[derive(ForyStruct)] struct Person { name: String, age: i32, --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
