-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Decimal would be a nice type to have, as often protocols don't want to have to deal with something like: 1e+0.
The problem is that it would be nice to be able to specify the number of decimal places, AND the range, without conflicting with the short float definitions.
Copying the idea for our int? types, for an example price type, defined as a decimal with 2 decimal places, and that must be positive, one possibility is:
"price" : decimal.2 0.0..,
The ABNF might look like:
decimal-type = decimal-kw [ decimal-places ] [ spaces float-range ]
decimal-places = "." pos-integer
We could possibly add this as an experimental type in an appendix of the I-D if we're not comfortable with it yet.
Metadata
Metadata
Assignees
Labels
No labels