ETSI's Bug Tracker - Part 11: Using JSON with TTCN-3
View Issue Details
0007724Part 11: Using JSON with TTCN-3[TTCN-3 Change Requests] Editorialpublic25-10-2017 11:4705-01-2018 09:41
nikolajev 
Gyorgy Rethy 
lowminorhave not tried
closedfixed 
V4.7.1 (published 2017-06) 
V4.8.1 (published 2020-05)V4.8.1 (published 2020-05) 
0007724: "Part 11: Using JSON with TTCN-3":"B.3.5 Number of fraction digits" use 0E0 instead of 0E1
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.
 
No tags attached.
docx CR7724.docx (142,671) 26-10-2017 16:46
http://oldforge.etsi.org/mantis/file_download.php?file_id=3720&type=bug
Issue History
25-10-2017 11:47nikolajevNew Issue
26-10-2017 13:41Kristóf SzabadosAssigned To => Kristóf Szabados
26-10-2017 13:41Kristóf SzabadosStatusnew => assigned
26-10-2017 16:36Kristóf SzabadosNote Added: 0014901
26-10-2017 16:46Kristóf SzabadosFile Added: CR7724.docx
26-10-2017 16:51Kristóf SzabadosNote Added: 0014903
26-10-2017 16:51Kristóf SzabadosAssigned ToKristóf Szabados => Tomas Urban
26-10-2017 16:51Kristóf SzabadosStatusassigned => confirmed
27-10-2017 12:55Tomas UrbanNote Added: 0014917
27-10-2017 12:55Tomas UrbanStatusconfirmed => resolved
27-10-2017 12:55Tomas UrbanResolutionopen => fixed
27-10-2017 12:55Tomas UrbanAssigned ToTomas Urban => Gyorgy Rethy
04-01-2018 17:00Gyorgy RethyProjectTTCN-3 Change Requests => Part 11: Using JSON with TTCN-3
05-01-2018 09:41Gyorgy RethyNote Added: 0015002
05-01-2018 09:41Gyorgy RethyStatusresolved => closed
05-01-2018 09:41Gyorgy RethyProduct Version => V4.7.1 (published 2017-06)
05-01-2018 09:41Gyorgy RethyFixed in Version => V4.8.1 (published 2020-05)
05-01-2018 09:41Gyorgy RethyTarget 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.