decimal_encoder
Encodes a Decimal as int of there's no exponent, otherwise float.
def decimal_encoder(
dec_value: Decimal
) - > int | float
Encodes a Decimal as int of there's no exponent, otherwise float.
Parameters
| Name | Type | Description |
|---|---|---|
| dec_value | Decimal | The Decimal value to be converted into a standard numeric type. |
Returns
| Type | Description |
|---|---|
| `int | float` |