Trim trailing 0 decimals

Issue #29 closed
Danny Roessner created an issue

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.

Comments (4)

  1. Former user Account Deleted

    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).

  2. Danny Roessner reporter

    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

  3. Former user Account Deleted

    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?

  4. Log in to comment