diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-08-23 21:00:32 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-08-27 11:46:11 +0200 |
| commit | b22b59adb72371d6ca7072eca2c166f4c2534677 (patch) | |
| tree | a8b0ec127bfafeb9e6e11fff8842e36617bdc38b /src | |
| parent | 413aac1035c855f3e735bf8539c0864182f9c6fb (diff) | |
json: wider initial array/object
Diffstat (limited to 'src')
| -rw-r--r-- | src/json.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); |
