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
The following commit(s) were added to refs/heads/main by this push:
new 329d425dac 🔄 synced local 'docs/guide/' with remote 'docs/guide/'
329d425dac is described below
commit 329d425dacd6fcc497cf92e4ea88d95b600023a2
Author: chaokunyang <[email protected]>
AuthorDate: Wed Feb 18 14:53:45 2026 +0000
🔄 synced local 'docs/guide/' with remote 'docs/guide/'
---
docs/guide/python/configuration.md | 2 +-
docs/guide/python/custom-serializers.md | 12 ++----------
2 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/docs/guide/python/configuration.md
b/docs/guide/python/configuration.md
index ab6d52f730..cb2b6afec1 100644
--- a/docs/guide/python/configuration.md
+++ b/docs/guide/python/configuration.md
@@ -61,7 +61,7 @@ class ThreadSafeFory:
| `compatible` | `bool` | `False` | Enable
schema evolution in cross-language mode, allowing fields to be added/removed
while maintaining compatibility.
|
| `max_depth` | `int` | `50` | Maximum
deserialization depth for security, preventing stack overflow attacks.
|
| `policy` | `DeserializationPolicy \| None` | `None` |
Deserialization policy used for security checks. Strongly recommended when
`strict=False`.
|
-| `field_nullable` | `bool` | `False` | In
Python-native mode (`xlang=False`), treat dataclass fields as nullable by
default. Ignored in xlang mode.
|
+| `field_nullable` | `bool` | `False` | Treat
dataclass fields as nullable by default (regardless of `xlang`).
|
| `meta_compressor` | `Any` | `None` | Optional
metadata compressor used for compatible-mode metadata encoding.
|
| `fory_factory` | `Callable \| None` | `None` |
`ThreadSafeFory` factory hook. When set, `ThreadSafeFory` creates instances via
this callback; otherwise it forwards `**kwargs` to `Fory` construction.
|
diff --git a/docs/guide/python/custom-serializers.md
b/docs/guide/python/custom-serializers.md
index 0ea85ead4d..e61cabba1b 100644
--- a/docs/guide/python/custom-serializers.md
+++ b/docs/guide/python/custom-serializers.md
@@ -23,7 +23,7 @@ Implement custom serialization logic for specialized types.
## Implementing Custom Serializers
-Override `write/read` for Python mode, `xwrite/xread` for cross-language:
+Implement `write/read` once for both Python and cross-language modes:
```python
import pyfory
@@ -50,14 +50,6 @@ class FooSerializer(Serializer):
f2 = buffer.read_string()
return Foo(f1, f2)
- # For cross-language mode
- def xwrite(self, buffer, obj: Foo):
- buffer.write_int32(obj.f1)
- buffer.write_string(obj.f2)
-
- def xread(self, buffer):
- return Foo(buffer.read_int32(), buffer.read_string())
-
f = pyfory.Fory()
f.register(Foo, type_id=100, serializer=FooSerializer(f, Foo))
@@ -143,4 +135,4 @@ fory.register(MyClass, typename="com.example.MyClass",
serializer=MySerializer(f
- [Type Registration](type-registration.md) - Registration patterns
- [Configuration](configuration.md) - Fory parameters
-- [Cross-Language](cross-language.md) - xwrite/xread for xlang
+- [Cross-Language](cross-language.md) - type registration and schema rules for
xlang
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]