daft.functions.try_deserialize#
try_deserialize #
try_deserialize(expr: Expression, format: Literal['json'], dtype: DataTypeLike) -> Expression
Deserializes a string using the specified format and data type, inserting nulls on failures.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
expr | Expression | The expression to deserialize. | required |
format | Literal['json'] | The serialization format. | required |
dtype | DataTypeLike | The target data type to deserialize into. | required |
Returns:
| Name | Type | Description |
|---|---|---|
Expression | Expression | A new expression with the deserialized value (or null). |
Source code in daft/functions/str.py
28 29 30 31 32 33 34 35 36 37 38 39 40 | |