Corrected comments in json pretty/ugly procedures (fixes #4255).
This commit is contained in:
parent
ca6986b89c
commit
9150645103
1 changed files with 4 additions and 2 deletions
|
|
@ -1009,7 +1009,7 @@ proc toPretty(result: var string, node: JsonNode, indent = 2, ml = true,
|
||||||
result.add("null")
|
result.add("null")
|
||||||
|
|
||||||
proc pretty*(node: JsonNode, indent = 2): string =
|
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.
|
## on multiple lines.
|
||||||
result = ""
|
result = ""
|
||||||
toPretty(result, node, indent)
|
toPretty(result, node, indent)
|
||||||
|
|
@ -1019,7 +1019,9 @@ proc toUgly*(result: var string, node: JsonNode) =
|
||||||
## regard for human readability. Meant to improve ``$`` string
|
## regard for human readability. Meant to improve ``$`` string
|
||||||
## conversion performance.
|
## 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.
|
## does **not** attempt to format the resulting JSON to make it human readable.
|
||||||
var comma = false
|
var comma = false
|
||||||
case node.kind:
|
case node.kind:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue