summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
authorA. S. Budden <abudden@gmail.com>2016-06-02 13:37:28 +0100
committerA. S. Budden <abudden@gmail.com>2016-06-02 13:38:43 +0100
commit91506451039ec8fd07363da948baa7a4f1680368 (patch)
tree37e0c5c16bc63bda72a4a7899623d41fd73a576a /lib/pure
parentca6986b89c6d5a6cb3f33dda1237147596928cfe (diff)
downloadNim-91506451039ec8fd07363da948baa7a4f1680368.tar.gz
Corrected comments in json pretty/ugly procedures (fixes #4255).
Diffstat (limited to 'lib/pure')
-rw-r--r--lib/pure/json.nim6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/pure/json.nim b/lib/pure/json.nim
index d310a6ed7..cea7a1e90 100644
--- a/lib/pure/json.nim
+++ b/lib/pure/json.nim
@@ -1009,7 +1009,7 @@ proc toPretty(result: var string, node: JsonNode, indent = 2, ml = true,
     result.add("null")
 
 proc pretty*(node: JsonNode, indent = 2): string =
-  ## Converts `node` to its JSON Representation, with indentation and
+  ## Returns a JSON Representation of `node`, with indentation and
   ## on multiple lines.
   result = ""
   toPretty(result, node, indent)
@@ -1019,7 +1019,9 @@ proc toUgly*(result: var string, node: JsonNode) =
   ## regard for human readability. Meant to improve ``$`` string
   ## conversion performance.
   ##
-  ## This provides higher efficiency than the ``toPretty`` procedure as it
+  ## JSON representation is stored in the passed `result`
+  ##
+  ## This provides higher efficiency than the ``pretty`` procedure as it
   ## does **not** attempt to format the resulting JSON to make it human readable.
   var comma = false
   case node.kind: