diff options
author | Eduardo Julian | 2022-01-07 03:15:45 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-01-07 03:15:45 -0400 |
commit | 8665dee72f0e2be39ef1c2d15f733bb7b30b6a73 (patch) | |
tree | 9f2c52d9f0ff41ef3f9385e678f0c74d1bfdf216 /stdlib/source/library/lux/data/format/json.lux | |
parent | d0f33f630aedb67d2888e32ceb7bc237839b274e (diff) |
Fixes for the pure-Lux JVM compiler machinery. [Part 3]
Diffstat (limited to 'stdlib/source/library/lux/data/format/json.lux')
-rw-r--r-- | stdlib/source/library/lux/data/format/json.lux | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/stdlib/source/library/lux/data/format/json.lux b/stdlib/source/library/lux/data/format/json.lux index 1ad804cdb..49686f9fa 100644 --- a/stdlib/source/library/lux/data/format/json.lux +++ b/stdlib/source/library/lux/data/format/json.lux @@ -232,9 +232,11 @@ (def: number_format (-> Number Text) - (|>> (case> - (^or +0.0 -0.0) "0.0" - value (let [raw (# f.decimal encoded value)] + (|>> (case> +0.0 ... OR -0.0 + "0.0" + + value + (let [raw (# f.decimal encoded value)] (if (f.< +0.0 value) raw (|> raw (text.split_at 1) maybe.trusted product.right)))))) |