summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2018-05-15 15:29:48 +0200
committerAraq <rumpf_a@web.de>2018-05-15 15:29:48 +0200
commit02f01470ab46067c18535605179b95b143b1e25f (patch)
treec1fd406ce01d9d858cd0163a451313176e60595c
parentc73cd5349ef532e8ac323a05c98fab7cb5c12fa5 (diff)
parentf8e23daa201abc83e3e4761621d20bb7dfe974c3 (diff)
downloadNim-02f01470ab46067c18535605179b95b143b1e25f.tar.gz
Merge branch 'devel' into araq-big-refactoring
-rw-r--r--lib/pure/json.nim3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/pure/json.nim b/lib/pure/json.nim
index b16918959..9f9339961 100644
--- a/lib/pure/json.nim
+++ b/lib/pure/json.nim
@@ -832,6 +832,9 @@ proc toJson(x: NimNode): NimNode {.compiletime.} =
     result = newCall(bindSym"newJObject")
   of nnkNilLit:
     result = newCall(bindSym"newJNull")
+  of nnkPar:
+    if x.len == 1: result = toJson(x[0])
+    else: result = newCall(bindSym"%", x)
   else:
     result = newCall(bindSym"%", x)