diff options
author | Araq <rumpf_a@web.de> | 2018-05-15 15:29:48 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2018-05-15 15:29:48 +0200 |
commit | 02f01470ab46067c18535605179b95b143b1e25f (patch) | |
tree | c1fd406ce01d9d858cd0163a451313176e60595c | |
parent | c73cd5349ef532e8ac323a05c98fab7cb5c12fa5 (diff) | |
parent | f8e23daa201abc83e3e4761621d20bb7dfe974c3 (diff) | |
download | Nim-02f01470ab46067c18535605179b95b143b1e25f.tar.gz |
Merge branch 'devel' into araq-big-refactoring
-rw-r--r-- | lib/pure/json.nim | 3 |
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) |