aboutsummaryrefslogtreecommitdiff
path: root/src/json.c
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2025-08-23 21:00:32 +0200
committerMartin Kagamino Lehoux <martin@lehoux.net>2025-08-27 11:46:11 +0200
commitb22b59adb72371d6ca7072eca2c166f4c2534677 (patch)
treea8b0ec127bfafeb9e6e11fff8842e36617bdc38b /src/json.c
parent413aac1035c855f3e735bf8539c0864182f9c6fb (diff)
json: wider initial array/object
Diffstat (limited to 'src/json.c')
-rw-r--r--src/json.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/json.c b/src/json.c
index 9c81e7f..c299b63 100644
--- a/src/json.c
+++ b/src/json.c
@@ -161,7 +161,7 @@ parse_result parse_array(Arena *a, byte *src, uptr start_pos, uptr max_pos) {
result.pos++;
return result;
}
- Vec items = Vec_new(a, JSON, 2);
+ Vec items = Vec_new(a, JSON, 6);
for (;;) {
result.pos = absorb_whitespaces(src, result.pos, max_pos);
parse_result item_result = parse_any(a, src, result.pos, max_pos);
@@ -216,8 +216,8 @@ parse_result parse_object(Arena *a, byte *src, uptr start_pos, uptr max_pos) {
parse_result result = {0};
result.pos = absorb_whitespaces(src, start_pos + 1, max_pos);
size len = 0;
- Vec keys = Vec_new(a, Str, 2);
- Vec values = Vec_new(a, JSON, 2);
+ Vec keys = Vec_new(a, Str, 6);
+ Vec values = Vec_new(a, JSON, 6);
if (src[result.pos] == '}') {
result.pos++;
result.value = JSON_object(len, keys, values);