From b2c6db97f9f477f6999fa9c7aae5e32f10b6b3fe Mon Sep 17 00:00:00 2001 From: Arne Döring Date: Fri, 7 Feb 2020 17:10:25 +0100 Subject: printing float values will have one more digit. (#13276) [backport] * printing float values will have one more digit. Fixes #13196 --- lib/pure/json.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/pure') 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 = "" -- cgit 1.4.1-2-gfad0