fixes #4399
This commit is contained in:
parent
857b0c8d4c
commit
019ee2260c
1 changed files with 1 additions and 0 deletions
|
|
@ -712,6 +712,7 @@ proc `%`*(b: bool): JsonNode =
|
|||
|
||||
proc `%`*(keyVals: openArray[tuple[key: string, val: JsonNode]]): JsonNode =
|
||||
## Generic constructor for JSON data. Creates a new `JObject JsonNode`
|
||||
if keyvals.len == 0: return newJArray()
|
||||
result = newJObject()
|
||||
for key, val in items(keyVals): result.fields[key] = val
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue