diff options
author | Miran <narimiran@disroot.org> | 2020-07-23 15:42:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-23 15:42:12 +0200 |
commit | 14d16c2174a4fcefd405f8c4eeaf57a6dcd2731d (patch) | |
tree | 7ac946bdfb68e37af10f51601b4850b127ed9b03 | |
parent | 925dd92e07bd8b031c9f237ceb9e352c34a97d64 (diff) | |
download | Nim-14d16c2174a4fcefd405f8c4eeaf57a6dcd2731d.tar.gz |
json.nim: smaller init size (#15048)
There was a recent `rightSize` change in tables.nim, so the existing value (4) was creating too large tables.
-rw-r--r-- | lib/pure/json.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pure/json.nim b/lib/pure/json.nim index 041816c7d..3f2e369f6 100644 --- a/lib/pure/json.nim +++ b/lib/pure/json.nim @@ -219,7 +219,7 @@ proc newJNull*(): JsonNode = proc newJObject*(): JsonNode = ## Creates a new `JObject JsonNode` - result = JsonNode(kind: JObject, fields: initOrderedTable[string, JsonNode](4)) + result = JsonNode(kind: JObject, fields: initOrderedTable[string, JsonNode](2)) proc newJArray*(): JsonNode = ## Creates a new `JArray JsonNode` @@ -264,7 +264,7 @@ proc getBool*(n: JsonNode, default: bool = false): bool = else: return n.bval proc getFields*(n: JsonNode, - default = initOrderedTable[string, JsonNode](4)): + default = initOrderedTable[string, JsonNode](2)): OrderedTable[string, JsonNode] = ## Retrieves the key, value pairs of a `JObject JsonNode`. ## |