ETSI's Bug Tracker - Part 11: Using JSON with TTCN-3
View Issue Details

ID | Project | Category | View Status | Date Submitted | Last Update
0007724 | Part 11: Using JSON with TTCN-3 | [TTCN-3 Change Requests] Editorial | public | 25-10-2017 11:47 | 05-01-2018 09:41

Reporter | nikolajev |
Assigned To | Gyorgy Rethy |
Priority | low | Severity | minor | Reproducibility | have not tried
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version | V4.7.1 (published 2017-06) |
Target Version | V4.8.1 (published 2020-05) | Fixed in Version | V4.8.1 (published 2020-05) |

Summary | 0007724: "Part 11: Using JSON with TTCN-3":"B.3.5 Number of fraction digits" use 0E0 instead of 0E1

Description

In "B.3.5 Number of fraction digits" examples, in case of "fractionDigits 0" encoding of <actual value> 0.0 is shown in JSON as "0E1 or 0E1" which is correct, but means 0.0x10.
In case of 0, 0E999 is also correct representation, but maybe it would be better to use E0 exponent this way it would look similar for all single digit integers:
0.0 would be 0E0 or 0e0
1.0 would be 1E0 or 1e0
otherwise it seems like 0E1 is a special case of JSON encoding.

Steps To Reproduce |
Additional Information |
Tags | No tags attached.
Relationships |
Attached Files | CR7724.docx (142,671) 26-10-2017 16:46 http://oldforge.etsi.org/mantis/file_download.php?file_id=3720&type=bug

Issue History
Date Modified | Username | Field | Change
25-10-2017 11:47 | nikolajev | New Issue |
26-10-2017 13:41 | KristÃ³f Szabados | Assigned To | => KristÃ³f Szabados
26-10-2017 13:41 | KristÃ³f Szabados | Status | new => assigned
26-10-2017 16:36 | KristÃ³f Szabados | Note Added: 0014901 |
26-10-2017 16:46 | KristÃ³f Szabados | File Added: CR7724.docx |
26-10-2017 16:51 | KristÃ³f Szabados | Note Added: 0014903 |
26-10-2017 16:51 | KristÃ³f Szabados | Assigned To | KristÃ³f Szabados => Tomas Urban
26-10-2017 16:51 | KristÃ³f Szabados | Status | assigned => confirmed
27-10-2017 12:55 | Tomas Urban | Note Added: 0014917 |
27-10-2017 12:55 | Tomas Urban | Status | confirmed => resolved
27-10-2017 12:55 | Tomas Urban | Resolution | open => fixed
27-10-2017 12:55 | Tomas Urban | Assigned To | Tomas Urban => Gyorgy Rethy
04-01-2018 17:00 | Gyorgy Rethy | Project | TTCN-3 Change Requests => Part 11: Using JSON with TTCN-3
05-01-2018 09:41 | Gyorgy Rethy | Note Added: 0015002 |
05-01-2018 09:41 | Gyorgy Rethy | Status | resolved => closed
05-01-2018 09:41 | Gyorgy Rethy | Product Version | => V4.7.1 (published 2017-06)
05-01-2018 09:41 | Gyorgy Rethy | Fixed in Version | => V4.8.1 (published 2020-05)
05-01-2018 09:41 | Gyorgy Rethy | Target Version | => V4.8.1 (published 2020-05)

Notes

(0014901)
KristÃ³f Szabados
26-10-2017 16:36

Talking with Thomas we found that 0E-1 might be the best way to represent the value 0.0 if variant "fractionDigits 0" is in effect.
This follows the usual algorithm, that when the number of fraction digits needed is greater than the number of fractional digits allowed: the exponent is the number of fraction digits allowed minus the number of fraction digits needed.
This way:
3.1415 -> 31415E-4
3.142 -> 3142E-3
3.14 -> 314E-2
3.1 -> 31E-1
so
0.0 -> 0E-1

(0014903)
KristÃ³f Szabados
26-10-2017 16:51

please check

(0014917)
Tomas Urban
27-10-2017 12:55

Though different from requested, the proposed solution seems to be logical and acceptable. The resolution is ready to be included in the next version of the "Unsing JSON with TTCN-3" specification.

(0015002)
Gyorgy Rethy
05-01-2018 09:41

Added to draft V4.7.2.