PydanticSerializationUnexpectedValue
No overview available.
Attributes
| Attribute | Type | Description |
|---|---|---|
| message | string | Custom error message explaining why the serialization value was unexpected. |
| field_name | string | The name of the specific field that encountered the unexpected value during serialization. |
| field_type | string | The expected type definition of the field as a string representation. |
| input_value | any | The actual Python object that was provided for serialization and caused the error. |
Constructor
Signature
def PydanticSerializationUnexpectedValue(
message: Optional[str] = None,
field_name: Optional[str] = None,
field_type: Optional[str] = None,
input_value: Optional[Any] = None
) - > None
Parameters
| Name | Type | Description |
|---|---|---|
| message | Optional[str] = None | An optional error message describing the serialization failure. |
| field_name | Optional[str] = None | The name of the field where the unexpected value was encountered. |
| field_type | Optional[str] = None | The expected type of the field. |
| input_value | Optional[Any] = None | The actual value provided that failed serialization. |
Signature
def PydanticSerializationUnexpectedValue(
message: Optional[str] = None,
field_name: Optional[str] = None,
field_type: Optional[str] = None,
input_value: Optional[Any] = None
) - > None
Parameters
| Name | Type | Description |
|---|---|---|
| message | Optional[str] = None | The error message describing why the serialization failed. |
| field_name | Optional[str] = None | The name of the model field that encountered the unexpected value. |
| field_type | Optional[str] = None | The expected type definition for the field being serialized. |
| input_value | Optional[Any] = None | The actual runtime value that was provided and caused the serialization conflict. |