kadler / db2sock-test

1 stars 0 forks source link

Trim trailing 0 decimals #29

Closed kadler closed 6 years ago

kadler commented 6 years ago

Original report by Danny Roessner (Bitbucket: droessner, GitHub: danny-hcs).


This is not technically a bug, but I think zoned/packed/etc fields that return decimals should trim trailing 0's. The example in Issue #24 shows this, but I can create a separate test case if necessary. In JSON trailing decimal 0's don't mean anything. Parsing {"num":1000.000} for example turns it into {"num":1000} anyway. Any trailing 0 decimals should be removed in the data in the output string.

kadler commented 6 years ago

Original comment by Danny Roessner (Bitbucket: droessner, GitHub: danny-hcs).


Agree to disagree. Too trivial for me to make a case for. Can leave as is. Closing.

kadler commented 6 years ago

Original comment by Tony Cairns (Bitbucket: rangercairns, GitHub: rangercairns).


Well, seems less important. And ... I suspect we would have to go through all tests/json .exp files to take out trailing '.00...'. Uf Da! Therefore, just leave it?

kadler commented 6 years ago

Original comment by Danny Roessner (Bitbucket: droessner, GitHub: danny-hcs).


I believe the official JSON standard does not disallow trailing 0's.

I was thinking more about output size. Just passing back unnecessary data. JavaScript will ignore it anyway.

Screen Shot 2018-02-28 at 12.54.15.png

kadler commented 6 years ago

Original comment by Tony Cairns (Bitbucket: rangercairns, GitHub: rangercairns).


Mm ... i like formatted zeros. I always end up format adding these zeros for dollar figures, etc.

json standards decide???

World wide standard for json or something? If yes, please point me to document.

popular vote decides?

So one vote remove zeros (boo), One vote leave formatted with zeros (pick me).