json.toUgly also uses optimized string routines
This commit is contained in:
parent
18690d4a61
commit
585a970106
1 changed files with 4 additions and 2 deletions
|
|
@ -1078,9 +1078,11 @@ proc toUgly*(result: var string, node: JsonNode) =
|
||||||
of JString:
|
of JString:
|
||||||
node.str.escapeJson(result)
|
node.str.escapeJson(result)
|
||||||
of JInt:
|
of JInt:
|
||||||
result.add($node.num)
|
when defined(js): result.add($node.num)
|
||||||
|
else: result.add(node.num)
|
||||||
of JFloat:
|
of JFloat:
|
||||||
result.add($node.fnum)
|
when defined(js): result.add($node.fnum)
|
||||||
|
else: result.add(node.fnum)
|
||||||
of JBool:
|
of JBool:
|
||||||
result.add(if node.bval: "true" else: "false")
|
result.add(if node.bval: "true" else: "false")
|
||||||
of JNull:
|
of JNull:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue