Skip to content

Commit 3d2cbf9

Browse files
committed
- adds warnings about the lack of precision
Signed-off-by: Vincent Biret <[email protected]>
1 parent 0d9e31b commit 3d2cbf9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

registries/_format/decimal.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
---
22
owner: baywet
33
issue: 889
4-
description: A fixed or floating point decimal number as defined by ISO/IEC 9075-2 2016 12 15
4+
description: A fixed point decimal number
55
base_type: string
66
layout: default
7+
remarks: Potential loss of precision when used with type number. Not specific enough about the size of the integral and fraction parts without the use of extensions.
78
---
89

910
# <a href="..">{{ page.collection }}</a>
@@ -12,7 +13,7 @@ layout: default
1213

1314
Base type: `{{ page.base_type }}`.
1415

15-
The `{{page.slug}}` format represents a fixed or floating point decimal number as defined by ISO/IEC 9075-2 2016 12 15.
16+
The `{{page.slug}}` format represents a fixed point decimal number.
1617

1718
{% if page.issue %}
1819
### GitHub Issue
@@ -23,5 +24,9 @@ The `{{page.slug}}` format represents a fixed or floating point decimal number a
2324
{% if page.remarks %}
2425
### Remarks
2526

27+
When the decimal format is used in combination with the number type, unintentional loss of precision can happen during serialization as most JSON serializers will serialize the value **1.10** to **1.1**.
28+
29+
This format is not prescriptive enough to enable interoperability and its usage is discouraged.
30+
2631
{{ page.remarks }}
2732
{% endif %}

0 commit comments

Comments
 (0)