You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: registries/_format/decimal.md
+7-2Lines changed: 7 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,10 @@
1
1
---
2
2
owner: baywet
3
3
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
5
5
base_type: string
6
6
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.
7
8
---
8
9
9
10
# <ahref="..">{{ page.collection }}</a>
@@ -12,7 +13,7 @@ layout: default
12
13
13
14
Base type: `{{ page.base_type }}`.
14
15
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.
16
17
17
18
{% if page.issue %}
18
19
### GitHub Issue
@@ -23,5 +24,9 @@ The `{{page.slug}}` format represents a fixed or floating point decimal number a
23
24
{% if page.remarks %}
24
25
### Remarks
25
26
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.
0 commit comments