mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-18 13:30:33 +00:00
json.toUgly also uses optimized string routines
This commit is contained in:
@@ -1078,9 +1078,11 @@ proc toUgly*(result: var string, node: JsonNode) =
|
||||
of JString:
|
||||
node.str.escapeJson(result)
|
||||
of JInt:
|
||||
result.add($node.num)
|
||||
when defined(js): result.add($node.num)
|
||||
else: result.add(node.num)
|
||||
of JFloat:
|
||||
result.add($node.fnum)
|
||||
when defined(js): result.add($node.fnum)
|
||||
else: result.add(node.fnum)
|
||||
of JBool:
|
||||
result.add(if node.bval: "true" else: "false")
|
||||
of JNull:
|
||||
|
||||
Reference in New Issue
Block a user