serialization_exclude_if
No overview available.
def serialization_exclude_if(
predicate: Callable[[Any], bool]
) - > Callable
Returns a decorator that conditionally excludes a field from serialization based on a predicate function.
Parameters
| Name | Type | Description |
|---|---|---|
| predicate | Callable[[Any], bool] | A function that receives the field value and returns True if the field should be omitted from the serialized output. |
Returns
| Type | Description |
|---|---|
Callable | A decorator function that attaches the exclusion predicate to the target field's metadata. |