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 9588e0dca8aa4e4f54b178f7582f96c4480c3ee0 Author: chaokunyang <[email protected]> AuthorDate: Thu May 28 06:49:40 2026 +0000 🔄 synced local 'docs/guide/' with remote 'docs/guide/' --- docs/guide/dart/basic-serialization.md | 4 ++-- docs/guide/dart/code-generation.md | 6 +++--- docs/guide/dart/index.md | 6 +++--- docs/guide/dart/type-registration.md | 6 +++--- docs/guide/dart/web-platform-support.md | 2 +- docs/guide/dart/xlang-serialization.md | 10 +++++----- docs/guide/swift/xlang-serialization.md | 6 +++--- docs/guide/xlang/getting-started.md | 4 ++-- 8 files changed, 22 insertions(+), 22 deletions(-) diff --git a/docs/guide/dart/basic-serialization.md b/docs/guide/dart/basic-serialization.md index 17f78bccef..cabe692f51 100644 --- a/docs/guide/dart/basic-serialization.md +++ b/docs/guide/dart/basic-serialization.md @@ -50,7 +50,7 @@ class Person { void main() { final fory = Fory(); - PersonFory.register( + PersonForyModule.register( fory, Person, namespace: 'example', @@ -130,7 +130,7 @@ This is an optimization. For most applications the default `serialize`/`deserial Before you can serialize a custom class or enum, register it with `Fory`. The generated code makes this easy: ```dart -PersonFory.register( +PersonForyModule.register( fory, Person, id: 100, diff --git a/docs/guide/dart/code-generation.md b/docs/guide/dart/code-generation.md index 5f5d999612..8b3404bba5 100644 --- a/docs/guide/dart/code-generation.md +++ b/docs/guide/dart/code-generation.md @@ -68,14 +68,14 @@ The generator creates a namespace (named after your file) with a `register` func ```dart final fory = Fory(); -ModelsFory.register(fory, Address, id: 1); -ModelsFory.register(fory, User, id: 2); +ModelsForyModule.register(fory, Address, id: 1); +ModelsForyModule.register(fory, User, id: 2); ``` Or use a stable name instead of a numeric ID (useful for cross-language scenarios): ```dart -ModelsFory.register( +ModelsForyModule.register( fory, User, namespace: 'example', diff --git a/docs/guide/dart/index.md b/docs/guide/dart/index.md index 74bb39b883..13affb4af2 100644 --- a/docs/guide/dart/index.md +++ b/docs/guide/dart/index.md @@ -80,13 +80,13 @@ class Person { void main() { final fory = Fory(); - PersonFory.register( + PersonForyModule.register( fory, Color, namespace: 'example', typeName: 'Color', ); - PersonFory.register( + PersonForyModule.register( fory, Person, namespace: 'example', @@ -111,7 +111,7 @@ Generate the companion file before running the program: dart run build_runner build --delete-conflicting-outputs ``` -`PersonFory` is generated by `build_runner`. The `namespace` and `typeName` values are how peers in other languages identify the same type — keep them stable once your service is in production. +`PersonForyModule` is generated by `build_runner`. The `namespace` and `typeName` values are how peers in other languages identify the same type; keep them stable once your service is in production. ## API Overview diff --git a/docs/guide/dart/type-registration.md b/docs/guide/dart/type-registration.md index f75b1f3042..cd94c1489d 100644 --- a/docs/guide/dart/type-registration.md +++ b/docs/guide/dart/type-registration.md @@ -30,7 +30,7 @@ Fory offers two strategies. Pick one and use it consistently across every langua Compact and fast. Good when a small team can coordinate IDs across services. ```dart -ModelsFory.register(fory, User, id: 100); +ModelsForyModule.register(fory, User, id: 100); ``` The same number must be used in every other language: @@ -45,7 +45,7 @@ fory.register(User.class, 100); More self-describing. Good when multiple teams or packages define types independently and numeric ID coordination is impractical. ```dart -ModelsFory.register( +ModelsForyModule.register( fory, User, namespace: 'example', @@ -62,7 +62,7 @@ Every runtime that reads or writes this type must use the same `namespace` and ` Call the generated `register` function from the `.fory.dart` file. It installs all the serializer metadata for you: ```dart -UserModelsFory.register(fory, User, id: 100); +UserModelsForyModule.register(fory, User, id: 100); ``` ## Registering a Custom Serializer diff --git a/docs/guide/dart/web-platform-support.md b/docs/guide/dart/web-platform-support.md index 481520770a..21280648c4 100644 --- a/docs/guide/dart/web-platform-support.md +++ b/docs/guide/dart/web-platform-support.md @@ -58,7 +58,7 @@ class Account { void main() { final fory = Fory(); - AccountFory.register( + AccountForyModule.register( fory, Account, namespace: 'example', diff --git a/docs/guide/dart/xlang-serialization.md b/docs/guide/dart/xlang-serialization.md index b8d5d28110..e146c129da 100644 --- a/docs/guide/dart/xlang-serialization.md +++ b/docs/guide/dart/xlang-serialization.md @@ -41,7 +41,7 @@ Simpler for small, tightly-coordinated teams: ```dart // Dart -ModelsFory.register(fory, Person, id: 100); +ModelsForyModule.register(fory, Person, id: 100); ``` ### Namespace + Type Name @@ -50,7 +50,7 @@ Better when multiple teams define types independently: ```dart // Dart -ModelsFory.register( +ModelsForyModule.register( fory, Person, namespace: 'example', @@ -80,7 +80,7 @@ class Person { } final fory = Fory(); -PersonFory.register(fory, Person, id: 100); +PersonForyModule.register(fory, Person, id: 100); final bytes = fory.serialize(Person() ..name = 'Alice' ..age = 30); @@ -103,7 +103,7 @@ Person value = (Person) fory.deserialize(bytesFromDart); ```dart final fory = Fory(); -PersonFory.register(fory, Person, id: 100); +PersonForyModule.register(fory, Person, id: 100); final bytes = fory.serialize(Person() ..name = 'Alice' ..age = 30); @@ -133,7 +133,7 @@ Person person = fory.Deserialize<Person>(payloadFromDart); ```dart final fory = Fory(); -PersonFory.register(fory, Person, id: 100); +PersonForyModule.register(fory, Person, id: 100); final bytes = fory.serialize(Person() ..name = 'Alice' ..age = 30); diff --git a/docs/guide/swift/xlang-serialization.md b/docs/guide/swift/xlang-serialization.md index c189baef40..e32c835192 100644 --- a/docs/guide/swift/xlang-serialization.md +++ b/docs/guide/swift/xlang-serialization.md @@ -89,14 +89,14 @@ Generated Swift code includes: - `@ForyStruct`, `@ForyEnum`, `@ForyUnion`, and field/case metadata - Tagged union enums (associated-value enum cases) -- `ForyRegistration.register(_:)` helpers with transitive import registration +- `ForyModule.install(_:)` helpers with transitive import installation - `toBytes` / `fromBytes` helpers on generated types -Use generated registration before xlang serialization: +Install the generated module before xlang serialization: ```swift let fory = Fory(ref: true) -try Addressbook.ForyRegistration.register(fory) +try Addressbook.ForyModule.install(fory) let payload = try fory.serialize(book) let decoded: Addressbook.AddressBook = try fory.deserialize(payload) diff --git a/docs/guide/xlang/getting-started.md b/docs/guide/xlang/getting-started.md index c5a7a30b1b..776f0d2683 100644 --- a/docs/guide/xlang/getting-started.md +++ b/docs/guide/xlang/getting-started.md @@ -293,7 +293,7 @@ fory.Register<Person>("example", "Person"); **Dart:** ```dart -PersonFory.register( +PersonForyModule.register( fory, Person, namespace: 'example', @@ -376,7 +376,7 @@ fory.Register<Person>(100); **Dart:** ```dart -PersonFory.register(fory, Person, id: 100); +PersonForyModule.register(fory, Person, id: 100); ``` **Swift:** --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
