A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's BigDecimal or Python's decimal.Decimal.
JSON representation |
---|
{ "value": string } |
Fields | |
---|---|
value |
The decimal value, as a string. The string representation consists of an optional sign, The fraction consists of a decimal point followed by zero or more decimal digits. The string must contain at least one digit in either the integer or the fraction. The number formed by the sign, the integer and the fraction is referred to as the significand. The exponent consists of the character Services should normalize decimal values before storing them by:
Services may perform additional normalization based on its own needs and the internal decimal implementation selected, such as shifting the decimal point and exponent value together (example: Note that only the The ENBF grammar is:
Services should clearly document the range of supported values, the maximum supported precision (total number of digits), and, if applicable, the scale (number of digits after the decimal point), as well as how it behaves when receiving out-of-bounds values. Services may choose to accept values passed as input even when the value has a higher precision or scale than the service supports, and should round the value to fit the supported scale. Alternatively, the service may error with Services should error with |