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