diff options
author | Arne Döring <arne.doering@gmx.net> | 2020-02-07 17:10:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-07 17:10:25 +0100 |
commit | b2c6db97f9f477f6999fa9c7aae5e32f10b6b3fe (patch) | |
tree | db2b5c35608cfab2dd81514c8bf0a7c643af3056 /lib/pure | |
parent | cdedb863488da74622aa1cbdf6e9e989dabd4145 (diff) | |
download | Nim-b2c6db97f9f477f6999fa9c7aae5e32f10b6b3fe.tar.gz |
printing float values will have one more digit. (#13276) [backport]
* printing float values will have one more digit. Fixes #13196
Diffstat (limited to 'lib/pure')
-rw-r--r-- | lib/pure/json.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pure/json.nim b/lib/pure/json.nim index 319a7b7ff..6ec0d1616 100644 --- a/lib/pure/json.nim +++ b/lib/pure/json.nim @@ -677,7 +677,7 @@ proc pretty*(node: JsonNode, indent = 2): string = ## Similar to prettyprint in Python. runnableExamples: let j = %* {"name": "Isaac", "books": ["Robot Dreams"], - "details": {"age": 35, "pi": 3.1415}} + "details": {"age": 35, "number": 3.125}} doAssert pretty(j) == """ { "name": "Isaac", @@ -686,7 +686,7 @@ proc pretty*(node: JsonNode, indent = 2): string = ], "details": { "age": 35, - "pi": 3.1415 + "number": 3.125 } }""" result = "" |