;doc: json tweaks

[ci skip]
This commit is contained in:
Simon Michael 2020-02-25 10:33:45 -08:00
parent a33a9d61c2
commit 3aebf03864

View File

@ -806,14 +806,16 @@ Some notes about JSON output:
instead of FOO's full details. This should never happen in hledger's instead of FOO's full details. This should never happen in hledger's
JSON output; if you see otherwise, please report as a bug. JSON output; if you see otherwise, please report as a bug.
- Quantities are represented in hledger as Decimal values storing up - hledger represents quantities as Decimal values storing up to 255
to 255 significant digits, eg for repeating decimals. This is too significant digits, eg for repeating decimals. Such numbers can
many digits and too much hassle for most JSON users, so in JSON we arise in practice (from automatically-calculated transaction
show simple Numbers with up to 10 decimal places. The number of prices), and would break most JSON consumers. So in JSON, we show
significant digits is still unbounded, but that part is under your quantities as simple Numbers with at most 10 decimal places. We
control. We hope this approach will not cause problems in practice; don't limit the number of integer digits, but that part is under
if you find otherwise, please let us know. (Cf your control.
[#1195](https://github.com/simonmichael/hledger/issues/1195)) We hope this approach will not cause problems in practice; if you
find otherwise, please let us know.
(Cf [#1195](https://github.com/simonmichael/hledger/issues/1195))
## Regular expressions ## Regular expressions